1 2005-02-17 Colin Walters <walters@verbum.org>
3 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
4 Rename to DBUS_SERVICE_DBUS.
5 (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
6 (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
7 (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
8 (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
9 DBUS_INTERFACE_INTROSPECTABLE.
10 (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
11 DBUS_INTERFACE_PROPERTIES.
12 (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
14 (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
17 All other users of those constants have been changed.
19 * bus/driver.c (bus_driver_handle_introspect): Use constants.
21 * glib/dbus-gobject.c (handle_introspect): Use constants.
23 * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
25 2005-02-17 Colin Walters <walters@verbum.org>
27 * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
28 (parse_node, parse_interface, parse_method, parse_signal)
29 (parse_property, parse_annotation): Lose if we're currently in an
31 (parse_annotation): New function.
32 (parser_start_element, parser_end_element): Handle annotation.
33 (parse_method, parse_interface): Remove support for c_name attribute,
34 switch to annotations.
36 * glib/dbus-gidl.h (interface_info_get_binding_names)
37 (method_info_get_binding_names)
38 (interface_info_get_binding_name, method_info_get_binding_name)
39 (interface_info_set_binding_name, method_info_set_binding_name):
41 (interface_info_get_annotations, method_info_get_annotations)
42 (interface_info_get_annotation, method_info_get_annotation)
43 (interface_info_add_annotation, method_info_add_annotation):
46 * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
48 (struct MethodInfo): Ditto.
49 Straightfoward conversion of binding methods into annotation methods
52 * glib/dbus-glib-tool.c (pretty_print): Print annotations.
54 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
56 * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
57 Use new annotation API.
59 * doc/introspect.dtd: Fix a number of DTD syntax errors. Add
62 * doc/dbus-specification.xml: Discuss introspection annotations,
63 include list of well-known annotations.
65 * test/glib/test-service-glib.xml: Make validate against new DTD.
67 2005-02-17 Colin Walters <walters@verbum.org>
69 This patch is based on initial work from
70 Paul Kuliniewicz <kuliniew@purdue.edu>.
72 * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
73 initialization of GValue from dbus type to here.
74 (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
75 for the "glib-genmarshal" program from a DBus type.
76 (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
77 into the C name for it we use in the glib bindings.
78 (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
79 glib C type (not GValue).
80 (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
82 * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
85 * glib/dbus-gutils.h: Prototype it.
87 * glib/dbus-gproxy.c: Include new dbus-gobject.h.
88 (marshal_dbus_message_to_g_marshaller): Use new shared function
89 dbus_glib_marshal_dbus_message_to_gvalue_array.
91 * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
92 Will be changed once we have annotations.
94 * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
95 GStaticRWLock. Callers updated.
96 (wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
97 (string_table_next): New function for iterating over zero-terminated
99 (string_table_lookup): New function; retrieves specific entry in
101 (get_method_data): New function; look up method data in object data chunk.
102 (object_error_domain_prefix_from_object_info)
103 (object_error_code_from_object_info): New functions, but not implemented yet.
104 (method_interface_from_object_info): New function; retrieve interface name.
105 (method_name_from_object_info): New function; retrieve method name.
106 (method_arg_info_from_object_info): New function; retrieve argument data.
107 (arg_iterate): New function; iterates over serialized argument data.
108 (method_dir_signature_from_object_info): New function; returns a
109 GString holding type signature for arguments for just one
110 direction (input or output).
111 (method_input_signature_from_object_info)
112 (method_output_signature_from_object_info): New functions.
113 (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
114 converts dbus message arguments into a GValue array. Used for both
115 signal handling and method invocation.
116 (struct DBusGlibWriteIterfaceData): New utility structure.
117 (write_interface): New function; generate introspection XML for
119 (introspect_interfaces): New function; gathers all interface->methods,
120 generates introspection XML for them.
121 (handle_introspect): Invoke introspect_interfaces.
122 (get_object_property): Be sure to zero-initalize stack-allocated GValue.
123 (lookup_object_and_method): New function; examines an incoming message
124 and attempts to match it up (via interface, method name, and argument
125 signature) with a known object and method.
126 (gerror_domaincode_to_dbus_error_name): New function; converts a
127 GError domain and code into a DBus error name. Needs GError data
128 added to object introspection to work well.
129 (gerror_to_dbus_error_message): Creates a DBusMessage error return from
131 (invoke_object_method): New function to invoke an object method
132 looked up via lookup_object_and_method. Parses the incoming
133 message, turns it into a GValue array, then invokes the marshaller
134 specified in the DBusGMethodInfo. Creates a new message with
135 either return values or error message as appropriate.
136 (gobject_message_function): Invoke lookup_object_and_method and
137 invoke_object_method.
139 * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
140 (enum DBusBindingOutputMode): New enum for binding output modes.
141 (pretty_print): Print binding names.
142 (dbus_binding_tool_error_quark): GError bits.
144 (main): Create GIOChannel for output. Parse new --mode argument,
145 possible values are "pretty-print", "glib-server", "glib-client".
146 Use mode to invoke appropriate function.
148 * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
150 * glib/dbus-glib-tool.h: New header, just includes GError bits
153 * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
154 maps binding style to name.
155 (struct MethodInfo): Ditto.
156 (get_hash_keys, get_hash_key): Utility function, returns keys for
158 (interface_info_new, method_info_new): Initialize bindings.
159 (interface_info_unref, method_info_unref): Destroy bindings.
160 (method_info_get_binding_names, method_info_get_binding_name)
161 (interface_info_get_binding_names, interface_info_get_binding_name):
162 Functions for retrieving binding names.
163 (method_info_set_binding_name, interface_info_set_binding_name):
164 Functions for setting binding names.
166 * glib/dbus-binding-tool-glib.h: New file, has prototypes
167 for glib binding generation.
169 * glib/dbus-binding-tool-glib.c: New file, implements server-side
170 and client-side glib glue generation.
172 * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
173 dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
176 * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
177 of using GClosureMarshal directly.
178 (struct DBusGObjectInfo): Add n_infos member.
180 * test/glib/test-service-glib.xml: New file; contains introspection data
181 for MyTestObject used in test-service-glib.c.
183 * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
184 (my_object_do_nothing, my_object_increment, my_object_throw_error)
185 (my_object_uppercase, my_object_many_args): New test methods.
186 (main): Use dbus_g_object_class_install_info to include generated object
189 * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
190 as well as client-side bindings.
192 * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
193 (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
194 using both the dbus_gproxy stuff directly as well as the generated bindings.
196 2005-02-15 Havoc Pennington <hp@redhat.com>
198 * dbus/dbus-connection.c (dbus_connection_dispatch): always
199 complete a pending call, don't run filters first.
201 * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
202 dbus_pending_call_steal_reply
204 * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
205 _dbus_connection_block_pending_call
206 (dbus_pending_call_get_reply): change to steal_reply and return a
209 * dbus/dbus-connection.c
210 (dbus_connection_send_with_reply_and_block): port to work in terms
212 (_dbus_connection_block_pending_call): replace block_for_reply
215 2005-02-14 Havoc Pennington <hp@redhat.com>
217 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
218 properly handle looking up group information by name; fix
221 2005-02-13 Havoc Pennington <hp@redhat.com>
223 * dbus/dbus-connection.c (dbus_connection_return_message)
224 (dbus_connection_borrow_message): hold dispatch lock while message
226 (_dbus_connection_block_for_reply): hold dispatch lock while we
227 block for the reply, so nobody steals our reply
228 (dbus_connection_pop_message): hold the dispatch lock while we
231 2005-02-13 Havoc Pennington <hp@redhat.com>
233 * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
234 (_dbus_connection_release_dispatch)
235 (_dbus_connection_acquire_io_path)
236 (_dbus_connection_release_io_path): make the mutex and condvar
237 control access to the "acquired" flag. Drop the connection lock
238 while waiting on the condvar. Hopefully these are baby steps in
239 roughly the right direction.
241 2005-02-13 Havoc Pennington <hp@redhat.com>
243 * dbus/dbus-connection.c: use separate mutexes for the condition
244 variables; this is some kind of baseline for sanity, but the
245 condition variables still aren't used correctly afaict
247 2005-02-13 Havoc Pennington <hp@redhat.com>
249 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
252 * dbus/dbus-connection.c
253 (_dbus_connection_detach_pending_call_unlocked): add this
255 Initial semi-correct pass through to fix thread locking; there are
256 still some issues with the condition variable paths I'm pretty
259 * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
262 * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
263 rename to add _unlocked
264 (struct DBusConnection): move "dispatch_acquired" and
265 "io_path_acquired" to use only one bit each.
266 (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
267 (dbus_connection_set_watch_functions): hacky fix to reentrancy
268 (_dbus_connection_add_watch, _dbus_connection_remove_watch)
269 (_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
270 (_dbus_connection_remove_timeout)
271 (_dbus_connection_toggle_timeout): drop lock when calling out to
272 user functions; done in a hacky/bad way.
273 (_dbus_connection_send_and_unlock): add a missing unlock
274 (_dbus_connection_block_for_reply): add a missing unlock
276 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
277 drop lock in a hacky probably unsafe way to call out to user
280 2005-02-12 Havoc Pennington <hp@redhat.com>
282 * tools/dbus-tree-view.c (info_set_func_text): display more
285 * bus/driver.c (bus_driver_handle_list_services): list the bus
288 * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
290 * glib/dbus-gidl.c (signal_info_get_n_args): new function
291 (method_info_get_n_args): new function
293 2005-02-12 Havoc Pennington <hp@redhat.com>
295 * bus/driver.c (bus_driver_handle_introspect): add introspection
298 2005-02-12 Havoc Pennington <hp@redhat.com>
300 * bus/driver.c: put the signature of each bus driver method in the
301 table of handlers and check it on incoming calls; this isn't
302 really useful, but going to add introspect support in a minute.
304 2005-02-11 Joe Shaw <joeshaw@novell.com>
306 * mono/Connection.cs: The unpredictability of finalizers in mono
307 prevents us from deterministically disconnecting the filters from
308 the Service class's finalizer, so move tracking of filters and
309 matches here. Add API for that.
311 * mono/Service.cs: Remove the code, add code which calls the
312 methods now on the Connection class.
314 2005-02-11 John (J5) Palmieri <johnp@redhat.com>
316 * python/dbus.py (class Sender): added to support dbus signals better
317 (Bus::add_signal_receiver): added expand_args parameter which defaults
318 to True. When expand args is True the signal handler will pass the
319 message arguments as parameters to the signal handler. If False
320 revert to previous behavior where the signal handler must get the
321 argument list from the message. This is to help port applications
322 like HAL that have a tendancy to send variable length argument lists.
323 self._match_rule_to_receivers is now a dict of dicts.
324 (Bus::remove_signal_receiver): pop handler off the dict intead of
325 removing it from a list
326 (Bus::_signal_func): change signal handlers so that interface,
327 signal_name, service, path and message are packed into a Sender
328 object and that is passed to the handler. If expand_args is True
329 extract the args list from the message and append it to the parameter
332 * python/dbus_bindings.pyx.in (class Signature): added to support
334 (MessageIter::__init__): changed iteration limit to match D-BUS
335 (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY,
336 STRUCT and VARIENT type support
337 (MessageIter::python_value_to_dbus_sig): made recursive to support
339 (MessageIter::append*): added Signature, dict, tuple
342 * python/examples/example-client.py: added examples of getting tuples
345 * python/examples/example-service.py: added examples of sending tuples
348 * python/examples/example-signal-recipient.py: Fixed to handle new
349 signal callback format
351 2005-02-10 Havoc Pennington <hp@redhat.com>
353 * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
354 (call dbus_g_proxy_add_signal)
356 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
358 (_dbus_server_new_for_domain_socket): escape the path
360 * dbus/dbus-address.c (dbus_address_escape_value): new
361 (dbus_address_unescape_value): new
362 (dbus_parse_address): unescape values
364 * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
366 * doc/dbus-specification.xml: explain how to escape values in
369 2005-02-10 Havoc Pennington <hp@redhat.com>
371 * dbus/dbus-message-factory.c (generate_special): modify test to
372 avoid using a non-basic dict key
374 * dbus/dbus-marshal-validate-util.c: add test for the below
376 * doc/dbus-specification.xml: require that dict keys are a basic
379 * dbus/dbus-marshal-validate.c
380 (_dbus_validate_signature_with_reason): require that dict key is a
383 2005-02-10 Havoc Pennington <hp@redhat.com>
385 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
386 change to be _and_unlock instead of _unlocked
388 * dbus/dbus-connection.c
389 (_dbus_connection_send_preallocated_unlocked_no_update): rename to
390 have no_update so we can find this bug quickly in future
392 2005-02-10 Havoc Pennington <hp@redhat.com>
394 * dbus/dbus-message-util.c (verify_test_message): tests for string
397 * dbus/dbus-message.c (dbus_message_append_args_valist): add
398 support for arrays of string/signature/path
400 2005-02-10 Joe Shaw <joeshaw@novell.com>
402 * dbus/dbus-connection.c
403 (_dbus_connection_queue_received_message_link,
404 _dbus_connection_message_sent): Add the path to
406 (_dbus_connection_send_preallocated_and_unlock): Added. Calls
407 _dbus_connection_send_preallocated_unlocked(), updated the
408 dispatch status, and unlocks. Fixes a bug where certain
409 situations (like a broken pipe) could cause a Disconnect message
410 to not be sent, tricking the bus into thinking a service was still
411 there when the process had quit.
412 (_dbus_connection_send_preallocated): Call
413 _dbus_connection_send_preallocated_and_unlock().
414 (_dbus_connection_send_and_unlock): Added. Calls
415 _dbus_connection_send_preallocated_and_unlock().
416 (dbus_connection_send): Call _dbus_connection_send_and_unlock().
417 (dbus_connection_send_with_reply): Update the dispatch status and
420 * mono/Service.cs (~Service): Added. Removes the filter so that
421 we don't get unmanaged code calling back into a GCed delegate.
422 (RemoveFilter); Added.
424 2005-02-09 John (J5) Palmieri <johnp@redhat.com>
426 * dbus/dbus-message.c (dbus_message_iter_open_container):
427 - Removed check for iterator type being an array because
428 get_arg_type does not work with writer iterators
429 - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
431 2005-02-07 Havoc Pennington <hp@redhat.com>
433 * doc/dbus-specification.xml: some more language cleanups; add
434 stuff about how to deal with invalid protocol and extension
435 points; add _ to allowed chars in auth commands; add EXTENSION_
438 2005-02-06 Havoc Pennington <hp@redhat.com>
440 * s/expected/required/ in a couple places for clarity
442 2005-02-07 Colin Walters <walters@verbum.org>
444 * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
445 sender or proposed_recipient.
447 2005-02-06 Havoc Pennington <hp@redhat.com>
449 * dbus/dbus-message-factory.c (generate_special): more tests
451 * dbus/dbus-marshal-validate.c (validate_body_helper): detect
452 array length that exceeds the maximum
454 2005-02-05 Havoc Pennington <hp@redhat.com>
456 * dbus/dbus-message-factory.c (generate_special): more test cases,
459 * dbus/dbus-marshal-validate.c (validate_body_helper): return the
460 reason why a signature was invalid
462 * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
463 skip the length of the string before we look at it in validation
465 * dbus/dbus-string-util.c (_dbus_string_test): add tests for
468 * dbus/dbus-message.c (_dbus_message_loader_new): default
469 max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
471 2005-02-05 Havoc Pennington <hp@redhat.com>
473 * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
474 if the signature of a variant was empty
475 (_dbus_validate_signature_with_reason): catch "(a)" (array inside
476 struct with no element type)
478 * dbus/dbus-message-factory.c (generate_uint32_changed): add more
479 mangled messages to break things
481 2005-02-04 Havoc Pennington <hp@redhat.com>
483 * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
484 g_quark_try_string() so it actually can return 0
485 (dbus_g_proxy_connect_signal): ditto
487 2005-02-04 Havoc Pennington <hp@redhat.com>
489 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
491 (tristring_from_message): assert cleanly on null path/interface
492 (should not be possible though I decided later)
493 (dbus_g_proxy_dispose): move proxy manager unregistration here
494 (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
495 g_return_if_fail() checks
497 2005-02-04 Havoc Pennington <hp@redhat.com>
499 * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
501 * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
502 (with some minor changes)
504 * doc/dbus-specification.xml: add deprecated attribute to
507 2005-01-31 Havoc Pennington <hp@redhat.com>
509 * glib/dbus-gproxy.c: rewrite how signals work again, this time I
510 think it's sort of right
512 2005-01-30 Havoc Pennington <hp@redhat.com>
514 * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
516 2005-01-30 Havoc Pennington <hp@redhat.com>
518 * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
520 * autogen.sh: change to autotools 1.9
522 * glib/dbus-gproxy.c: completely change how signals work
523 (dbus_g_proxy_add_signal): new function to specify signature of a
525 (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
526 and g_warning if the incoming message has the wrong signature.
528 2005-01-30 Havoc Pennington <hp@redhat.com>
530 * tools/dbus-names-model.c (have_names_notify): fix this
532 * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
533 up the string array handling a bit
535 2005-01-30 Havoc Pennington <hp@redhat.com>
537 * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
538 (dbus_g_pending_call_cancel): new function
540 * dbus/dbus-glib.h: move GType decls for connection/message here;
541 * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
542 here, just kind of rationalizing how we handle all that
544 * tools/dbus-names-model.c: new file for a tree model listing the
547 * tools/dbus-tree-view.c (model_new): use proper typing on the
550 2005-01-30 Havoc Pennington <hp@redhat.com>
552 * glib/dbus-gmain.c: add a custom GSource back that just checks
553 whether the message queue has anything in it; otherwise, there are
554 cases where we won't see messages in the queue since there was no
555 IO visible to the glib main loop
557 * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
558 increase default message timeout to 25 seconds
560 2005-01-30 Havoc Pennington <hp@redhat.com>
562 * test/glib/test-profile.c (no_bus_stop_server): remove the
563 warning about the g_warning that I just fixed
565 * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
566 custom source, seems to be a lot easier to understand and work
569 2005-01-30 Havoc Pennington <hp@redhat.com>
571 I think this main loop thing is conceptually broken, but here are
572 some band aids. I'll maybe rewrite it in a minute.
574 * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
575 custom GSource, so don't pass it in; confusing
576 (gsource_server_finalize, gsource_connection_finalize): add
577 finalize handlers that remove all the watches.
579 2005-01-30 Havoc Pennington <hp@redhat.com>
581 * glib/dbus-gobject.c (introspect_properties): fix the XML
584 * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
585 which effectively detects the use of freed messages
587 * glib/dbus-gobject.c (handle_introspect): modify and return the
588 reply message instead of the incoming message
590 * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
591 gee, maybe it should SEND THE XML instead of just making a string
592 and freeing it again ;-)
594 * tools/dbus-print-message.c (print_message): improve printing of
597 * configure.in: add debug-glib.service to the output
599 2005-01-30 Havoc Pennington <hp@redhat.com>
601 dbus-viewer introspected and displayed the bus driver
603 * dbus/dbus-object-tree.c
604 (object_tree_test_iteration): add tests for a handler registered on "/"
606 * dbus/dbus-object-tree.c
607 (_dbus_decompose_path): fix to handle path "/" properly
608 (run_decompose_tests): add tests for path decomposition
610 * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
613 * glib/dbus-gobject.c (handle_introspect): fix quotes
615 * test/glib/run-test.sh: support launching the bus, then running
618 * test/glib/test-service-glib.c (main): put in a trivial gobject
619 subclass and register it on the connection
621 * bus/driver.c (bus_driver_handle_introspect): implement
622 introspection of the bus driver service
624 * dbus/dbus-protocol.h: add #defines for the XML namespace,
625 identifiers, doctype decl
627 * bus/driver.c (bus_driver_handle_get_service_owner): handle
628 attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
629 returning the service unchanged.
630 (bus_driver_handle_message): remove old check for reply_serial in
631 method calls, now the message type deals with that
632 (bus_driver_handle_message): handle NULL interface
634 * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
636 * glib/dbus-gloader-expat.c (description_load_from_string): allow
639 * tools/dbus-viewer.c: add support for introspecting a service on
642 * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
643 (dbus_g_pending_call_unref): add
645 2005-01-29 Havoc Pennington <hp@redhat.com>
647 * tools/dbus-tree-view.c: add support for displaying properties.
648 (run dbus-viewer with an introspect xml file as arg, then resize
649 the window so the tree elements show up, not sure what that is)
651 * glib/dbus-gobject.c (handle_introspect): return
652 org.freedesktop.Properties and org.freedesktop.Introspectable
653 interfaces when we are introspected.
655 * doc/dbus-specification.xml: allow empty interface name when
658 2005-01-29 Havoc Pennington <hp@redhat.com>
660 * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
661 though it uses glib, it could be extended for any binding in
664 * glib/dbus-gobject.c (gobject_message_function): change to the
665 new way properties work
667 * dbus/dbus-protocol.h: add the new interfaces
669 * doc/dbus-specification.xml: document the introspection format,
670 Introspectable interface, and add an org.freedesktop.Properties
673 * glib/dbus-gparser.c: add support for a <property> element
675 * glib/dbus-gidl.c: add PropertyInfo
677 * glib/dbus-gobject.c (handle_introspect): put the outermost
678 <node> outside the signal and property descriptions.
679 (introspect_properties): export properties as <property> rather
682 2005-01-28 Havoc Pennington <hp@redhat.com>
684 * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
685 related to authentication protocol
687 2005-01-28 John (J5) Palmieri <johnp@redhat.com>
689 * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
690 - BUS_ACTIVATION -> BUS_STARTER
691 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
692 - class MessageIter (__init__): Added recursion checking
693 so we throw a nice error instead of just disconnecting from the
695 (get): Added arg_type parameter for recursion.
697 Added signiture type placeholder (not implemented)
698 Added struct type placeholder (not implemented)
699 Added varient type placeholder (not implemented)
700 Commented out dict type for now
701 (get_element_type): renamed from get_array_type
702 (get_*): changed to use the dbus_message_iter_get_basic API
703 (get_*_array): removed in favor of recursive get_array method
704 (get_array): new recursive method which calls get to marshal
705 the elements of the array
706 (value_to_dbus_sig): New method returns the corrasponding
707 dbus signiture to a python value
708 (append): Comment out dict handling for now
709 Handle lists with the new recursive API
710 Comment out None handling for now
711 (append_nil): removed
712 (append_*): changed to use dbus_message_iter_append_basic API
713 (append_*_array): removed in favor of recursive append_array
715 (__str__): Make it easier to print out recursive iterators
717 - class Message (__str__): moved type inspection to the
718 MessageIter class' __str__ method
719 (get_iter): Added an append parameter wich defaults to False
720 If True use the new API's to create an append iterator
722 * python/dbus.py: Update to use new bindings API
723 - TYPE_ACTIVATION -> TYPE_STARTER
724 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
725 - class ActivationBus -> class StarterBus
726 - class RemoteObject (__call__): get an append iterator
727 - (_dispatch_dbus_method_call): get an append iterator
728 - class Object (emit_signal): get an append iterator
730 * python/examples/: Fixed up the examples to work with the new API
732 2005-01-28 Joe Shaw <joeshaw@novell.com>
734 * configure.in: Bump version up to 0.30.
736 * HACKING: Add a release item to bump the version number up after
739 2005-01-28 Havoc Pennington <hp@redhat.com>
741 * doc/dbus-specification.xml: update to describe 16-bit types and
744 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
747 * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
750 * dbus/dbus-marshal-recursive.c: implement
752 2005-01-27 Havoc Pennington <hp@redhat.com>
754 * dbus/dbus-arch-deps.h.in: add 16/32-bit types
756 * configure.in: find the right type for 16 and 32 bit ints as well
759 * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
760 the 16-bit types so people don't have to stuff them in 32-bit or
763 2005-01-27 Havoc Pennington <hp@redhat.com>
765 * dbus/dbus-message.c: byteswap the message if you init an
766 iterator to read/write from it
768 * dbus/dbus-marshal-byteswap.c: new file implementing
769 _dbus_marshal_byteswap()
771 * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
773 2005-01-26 Havoc Pennington <hp@redhat.com>
775 * dbus/dbus-marshal-validate-util.c: break this out (and fix
776 build, apparently - nobody noticed?)
778 2005-01-26 Havoc Pennington <hp@redhat.com>
780 * dbus/dbus-marshal-recursive.h: remove todo comment
782 2005-01-25 Joe Shaw <joeshaw@novell.com>
784 * Land the mono binding changes to conform to the new APIs.
786 * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
787 DBusType/Dict.cs, and DBusType/Nil.cs from the build.
789 * mono/Arguments.cs (GetCodeAsString): Added. Returns the dbus
790 type code as a string.
791 (InitAppending): Rename dbus_message_append_iter_init() to
792 dbus_message_iter_init_append().
794 * mono/BusDriver.cs: Rename ServiceEventHandler to
795 NameOwnerChangedHandler. Rename GetServiceOwner to GetOwner.
796 Rename ServiceOwnerChanged to NameOwnerChanged.
798 * mono/Connection.cs: Rename BaseService to UniqueName, and the
801 * mono/Custom.cs: Removed. The CUSTOM type has been removed.
803 * mono/Service.cs: Rename Exists to HasOwner, internally rename
804 dbus_bus_acquire_service() to dbus_bus_request_name().
806 * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
807 of Type.UnderlyingSystemType to get the correct element type for
809 (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
810 dbus_message_get_{element|arg}_type() instead of
811 dbus_message_iter_init_array_iterator().
812 (Append): Replace dbus_message_iter_append_array() with
813 dbus_message_iter_open_container() and
814 dbus_message_iter_close_container().
816 * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed. These
817 types have been removed.
819 * mono/DBusType/*.cs: Replace calls of
820 dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
821 but specify the type in the DllImport extern declaration. Ditto
822 for dbus_message_iter_append_[type]() ->
823 dbus_message_iter_append_basic().
825 * mono/example/BusListener.cs: Update for ServiceEventHandler ->
826 NameOwnerChangedHandler.
828 2005-01-25 John (J5) Palmieri <johnp@redhat.com>
830 * python/dbus_bindings.pyx.in: Rename of methods and bindings
831 - get_base_service -> get_unique_name
832 - bus_get_base_service -> bus_get_unique_name
833 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
834 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS
835 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
836 - bus_activate_service -> bus_start_service_by_name
837 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
838 - bus_acquire_service -> bus_request_name
839 - dbus_bus_acquire_service -> dbus_bus_request_name
840 - bus_service_exists -> bus_name_has_owner
841 - dbus_bus_service_exists -> dbus_bus_name_has_owner
843 * python/dbus.py: Rename of methods
844 - activate_service -> start_service_by_name
845 - bus_acquire_service -> bus_request_name
846 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS
847 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
850 2005-01-24 Joe Shaw <joeshaw@novell.com>
852 * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
853 signature for the method that can't be found.
855 * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
856 the message has any arguments, we need to call
857 _dbus_type_reader_get_current_type(), not
858 _dbus_type_reader_has_next().
860 2005-01-24 Havoc Pennington <hp@redhat.com>
862 * dbus/dbus-message-factory.c: more testing of message validation
864 * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
867 2005-01-23 Havoc Pennington <hp@redhat.com>
869 * dbus/dbus-message-factory.c, dbus/dbus-message-util.c:
870 get this all working, not many tests in the framework yet though
872 2005-01-22 Havoc Pennington <hp@redhat.com>
874 * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
875 tutorial, based on work from David Wheeler.
877 2005-01-21 Havoc Pennington <hp@redhat.com>
879 * dbus/dbus-bus.c: add more return_if_fail checks
881 * dbus/dbus-message.c (load_message): have the "no validation"
882 mode (have to edit the code to toggle the mode for now though)
884 * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
885 skips all validation; I want to use this at least for benchmark
886 baseline, I'm not sure if it should be a publicly-available switch.
888 2005-01-21 Havoc Pennington <hp@redhat.com>
890 * glib/dbus-gmain.c: don't put the GLib bindings in the same
891 toplevel doxygen group as the low-level API stuff
893 * dbus/dbus.h: note that libdbus is the low-level API
895 2005-01-20 Havoc Pennington <hp@redhat.com>
897 * update-dbus-docs.sh: script to update docs on the web site, only
898 works for me though. neener.
900 2005-01-20 Havoc Pennington <hp@redhat.com>
902 * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
903 code can reveal bugs in it
905 2005-01-20 Havoc Pennington <hp@redhat.com>
907 * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
908 select() version, patches from Tor Lillqvist
910 2005-01-20 Havoc Pennington <hp@redhat.com>
912 * doc/dbus-tutorial.xml: replace > with >
914 * bus/services.c (bus_registry_acquire_service): validate the name
915 and return a better error if it's no good.
917 * doc/dbus-specification.xml: note NO_AUTO_START change
919 * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
920 from AUTO_START, we're toggling the default
922 * bus/dispatch.c: adapt the tests to change of auto-start default
924 2005-01-18 Havoc Pennington <hp@redhat.com>
926 * rename dbus-daemon-1 to dbus-daemon throughout
928 2005-01-18 Havoc Pennington <hp@redhat.com>
930 * Throughout, grand renaming to strip out the use of "service",
931 just say "name" instead (or "bus name" when ambiguous). Did not
932 change the internal code of the message bus itself, only the
933 programmer-facing API and messages.
935 * doc/dbus-specification.xml: further update the message bus section
937 * bus/config-parser.c (all_are_equiv): fix bug using freed string
940 2005-01-17 Havoc Pennington <hp@redhat.com>
942 * dbus/dbus-types.h: remove 16-bit types since we don't use them
945 * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
946 "invalid name character" not only non-ASCII
948 * doc/dbus-specification.xml: further update spec, message bus
949 parts are still out-of-date but the marshaling etc. stuff is now
952 2005-01-17 Havoc Pennington <hp@redhat.com>
954 * doc/dbus-specification.xml: partially update spec
956 2005-01-17 Havoc Pennington <hp@redhat.com>
958 * Throughout, align variant bodies according to the contained
959 type, rather than always to 8. Should save a fair bit of space in
962 * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
963 fix handling of case where p == end
965 * doc/TODO: remove the dbus_bool_t item and variant alignment items
967 2005-01-17 Havoc Pennington <hp@redhat.com>
969 * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
971 * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
972 of an 8-bit type. Now dbus_bool_t is the type to use whenever you
973 are marshaling/unmarshaling a boolean.
975 2005-01-16 Havoc Pennington <hp@redhat.com>
977 This is about it on what can be disabled/deleted from libdbus
978 easily, back below 150K anyhow. Deeper cuts are more work than
979 just turning the code off as I've done here.
981 * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
982 signed int convenience funcs
984 * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
987 * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
988 things out of libdbus
990 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
992 * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
993 tests-enabled-only, though it should probably be deleted)
995 * dbus/dbus-message-util.c: same stuff
997 * dbus/dbus-auth-util.c: same stuff
999 2005-01-16 Havoc Pennington <hp@redhat.com>
1001 * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
1003 * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
1004 way for stripping down dbus-userdb.c stuff included in libdbus.
1005 Rename _dbus_parse_uid for consistency.
1007 2005-01-16 Havoc Pennington <hp@redhat.com>
1009 * dbus/dbus-internals.c (_dbus_real_assert): print the function
1010 name the assertion failed in
1012 * dbus/dbus-internals.h (_dbus_return_if_fail)
1013 (_dbus_return_val_if_fail): assert that the name of the function
1014 containing the check doesn't start with '_', since we only want to
1015 use checks on public functions
1017 * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
1018 checks to assertions
1020 * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
1021 change checks to asserts for private function
1023 * dbus/dbus-message.c (_dbus_message_set_serial): checks
1024 to asserts for private function
1026 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
1027 broken assertion that was breaking make check
1028 (_dbus_type_reader_array_is_empty): remove this rather than fix
1029 it, was only used in assertions
1031 2005-01-16 Havoc Pennington <hp@redhat.com>
1033 * test/unused-code-gc.py: hacky script to find code that's used
1034 only by the bus (not libdbus) or used only by tests or not used at
1035 all. It has some false alarms, but looks like we can clean up a
1036 lot of size from libdbus.
1038 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
1039 dbus/Makefile.am: initially move 10K of binary size out of libdbus
1041 2005-01-16 Havoc Pennington <hp@redhat.com>
1043 * Add and fix docs according to Doxygen warnings throughout
1046 * dbus/dbus-marshal-recursive.c
1047 (_dbus_type_reader_array_is_empty): change this to just call
1048 array_reader_get_array_len() and make it static
1050 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
1052 (dbus_message_iter_init_append): rename from append_iter_init
1054 * dbus/dbus-marshal-recursive.c
1055 (_dbus_type_reader_get_element_type): rename from
1056 _dbus_type_reader_get_array_type
1058 2005-01-15 Havoc Pennington <hp@redhat.com>
1060 * test/glib/test-profile.c (with_bus_server_filter): fix crash
1062 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
1063 when DBUS_DISABLE_ASSERT
1064 (_dbus_marshal_set_basic): be sure we align for the string length
1066 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
1069 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
1070 inline macro version
1071 (_dbus_string_set_byte): provide inline macro version
1073 2005-01-15 Havoc Pennington <hp@redhat.com>
1075 * Land the new message args API and type system.
1077 This patch is huge, but the public API change is not
1078 really large. The set of D-BUS types has changed somewhat,
1079 and the arg "getters" are more geared toward language bindings;
1080 they don't make a copy, etc.
1082 There are also some known issues. See these emails for details
1084 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
1085 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
1087 * dbus/dbus-marshal-*: all the new stuff
1089 * dbus/dbus-message.c: basically rewritten
1091 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
1092 freed blocks to be all non-nul bytes so using freed memory is less
1093 likely to work right
1095 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
1096 DBUS_FAIL_MALLOC=N environment variable, so you can do
1097 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
1098 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
1101 * qt/message.cpp: port to the new message args API
1102 (operator<<): use str.utf8() rather than str.unicode()
1103 (pretty sure this is right from the Qt docs?)
1105 * glib/dbus-gvalue.c: port to the new message args API
1107 * bus/dispatch.c, bus/driver.c: port to the new message args API
1109 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
1110 "locked" flag to TRUE and align_offset to 0; I guess we never
1111 looked at these anyhow, but seems cleaner.
1113 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
1114 move allocation padding macro to this header; use it to implement
1115 (_DBUS_STRING_STATIC): ability to declare a static string.
1117 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
1118 change to return TRUE if the interface is not set.
1120 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
1121 to dbus-marshal-validate.[hc]
1123 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
1126 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
1127 to dbus-marshal-*.[hc]
1129 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
1130 function here from dbus-marshal.c
1132 2005-01-12 Joe Shaw <joeshaw@novell.com>
1134 * NEWS: Update for 0.23.
1136 * configure.in: Release 0.23.
1138 2005-01-12 Joe Shaw <joeshaw@novell.com>
1140 * mono/Makefile.am, mono/example/Makefile.am: Always build the
1141 dbus DLL with --debug. Clean up after the .mdb files this leaves
1144 * mono/doc/Makefile.am: Need to uninstall the docs on "make
1147 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
1148 is an enum, get the enum's underlying type. Another mono
1151 2005-01-11 Joe Shaw <joeshaw@novell.com>
1153 Patch from Sjoerd Simons <sjoerd@luon.net>
1155 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
1156 DESTDIR. It breaks stuff.
1158 2005-01-11 Joe Shaw <joeshaw@novell.com>
1160 Patch from Tambet Ingo <tambet@ximian.com>
1162 * mono/DBusType/Array.cs (Get): Get the underlying element type by
1163 calling type.GetElementType(). The code previously depended on
1164 broken Mono behavior, which was fixed in Mono 1.1.3.
1166 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
1167 Activator.CreateInstance() so that the class's constructor is
1168 called with the right parameters.
1170 2005-01-11 Joe Shaw <joeshaw@novell.com>
1172 Patch from Timo Teräs <ext-timo.teras@nokia.com>
1174 * dbus/dbus-connection.c
1175 (_dbus_connection_queue_received_message_link): Call
1176 _dbus_connection_remove_timeout() instead of the _locked()
1177 variant, since it's always called from
1178 _dbus_connection_handle_watch(), which handles the locking.
1179 Removed the _locked() variant since it's no longer used.
1181 2005-01-03 Havoc Pennington <hp@redhat.com>
1183 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
1186 2004-12-26 Havoc Pennington <hp@redhat.com>
1188 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
1190 2005-01-03 Havoc Pennington <hp@redhat.com>
1192 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
1195 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
1197 2005-01-02 Havoc Pennington <hp@redhat.com>
1199 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
1201 2005-01-01 Havoc Pennington <hp@redhat.com>
1203 * configure.in: add -Wfloat-equal
1205 2005-01-01 Havoc Pennington <hp@redhat.com>
1207 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
1208 for a variety of reasons '==' doesn't do this.
1210 2004-12-31 Havoc Pennington <hp@redhat.com>
1212 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
1213 I keep wishing I had
1215 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
1217 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
1219 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
1221 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
1222 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
1223 dbus-protocol.h. Because they are defines and not enums they are not
1226 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
1228 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
1229 dbus_bus_activate_service
1231 * python/dbus.py (Bus.activate_service): activate a service on the
1234 2004-12-24 Havoc Pennington <hp@redhat.com>
1236 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
1237 file format has also changed and I haven't adapted to that yet
1239 * Makefile.am: load .gcno files from latest gcc
1241 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
1242 * Patch from Rob Taylor <robtaylor@fastmail.fm>
1244 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
1247 * python/dbus.py (get_unix_user): Added binding to
1248 call dbus_bindings.bus_get_unix_user
1250 * python/extract.py: Modified the proto_pat regex to
1251 handle unsigned long
1253 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1255 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
1256 better POSIX compliance.
1258 2004-12-19 Havoc Pennington <hp@redhat.com>
1260 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
1261 (_dbus_string_insert_8_aligned): new functions
1263 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
1265 2004-12-18 Havoc Pennington <hp@redhat.com>
1267 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
1270 * dbus/dbus-message.c: fix a comment, and add a still-unused
1271 not-implemented function
1273 * dbus/dbus-marshal.h: fix comment
1275 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
1277 2004-12-17 Joe Shaw <joeshaw@novell.com>
1279 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
1280 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
1281 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
1282 Type.UnderlyingSystemType to get the actual system type
1283 underneath. This code previously depended on the broken Mono
1284 behavior, which was fixed in 1.1.3.
1286 2004-11-27 Havoc Pennington <hp@redhat.com>
1288 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
1290 (_dbus_string_get_const_data): inline when asserts are disabled
1292 * dbus/dbus-message.c: record the _dbus_current_generation of
1293 creation so we can complain if dbus_shutdown() is used improperly.
1294 Do this only if checks are enabled.
1296 * dbus/dbus-connection.c: ditto
1298 2004-11-26 Havoc Pennington <hp@redhat.com>
1300 * test/glib/test-profile.c: add with_bus mode to profile echoes
1301 that go through the bus.
1303 * test/glib/run-test.sh: add ability to run test-profile
1305 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
1308 2004-11-26 Havoc Pennington <hp@redhat.com>
1310 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
1311 thing was implemented
1313 2004-11-26 Havoc Pennington <hp@redhat.com>
1315 * test/glib/test-profile.c: tweak a bit, add support for some
1316 made-up minimal malloc overhead with plain sockets, since in
1317 real life some sort of buffers are unavoidable thus we could
1318 count them in the theoretical best case
1320 2004-11-26 Havoc Pennington <hp@redhat.com>
1322 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
1323 where I was trying to cache one too many messages
1325 2004-11-26 Havoc Pennington <hp@redhat.com>
1327 * dbus/dbus-message.c: reimplement message cache as an array which
1328 makes the cache about twice as fast and saves maybe 1.5% overall
1330 2004-11-26 Havoc Pennington <hp@redhat.com>
1332 * dbus/dbus-threads.c (init_global_locks): forgot to put the
1333 message cache lock here
1335 2004-11-26 Havoc Pennington <hp@redhat.com>
1337 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
1338 the "char byte_order" next to each other to save 4 bytes
1339 (dbus_message_new_empty_header): reduce preallocation, since the
1340 message cache should achieve a similar effect
1341 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
1342 message cache that keeps a few DBusMessage around in a pool,
1343 another 8% speedup or so.
1345 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
1347 2004-11-25 Havoc Pennington <hp@redhat.com>
1349 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
1350 to write, without reading or blocking, try it before the poll()
1351 and skip the poll() if nothing remains to write. This is about a
1352 3% speedup in the echo client/server
1354 2004-11-25 Havoc Pennington <hp@redhat.com>
1356 The primary change here is to always write() once before adding
1357 the write watch, which gives us about a 10% performance increase.
1359 * dbus/dbus-transport-unix.c: a number of modifications to cope
1360 with removing messages_pending
1361 (check_write_watch): properly handle
1362 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
1363 messages_pending stuff
1364 (check_read_watch): properly handle WAITING_FOR_MEMORY and
1366 (unix_handle_watch): after writing, see if the write watch can be
1368 (unix_do_iteration): assert that write_watch/read_watch are
1369 non-NULL rather than testing that they aren't, since they
1370 aren't allowed to be NULL. check_write_watch() at the end so
1371 we add the watch if we did not finish writing (e.g. got EAGAIN)
1373 * dbus/dbus-transport-protected.h: remove messages_pending call,
1374 since it resulted in too much inefficient watch adding/removing;
1375 instead we now require that the transport user does an iteration
1376 after queueing outgoing messages, and after trying the first
1377 write() we add a write watch if we got EAGAIN or exceeded our
1378 max bytes to write per iteration setting
1380 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
1383 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
1384 freed and then accessed, valgrind flagged this bug, fix it
1386 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
1387 as the last valid field plus 1, where really it is equal to the
1388 last valid field. Corrects some message corruption issues.
1390 * dbus/dbus-mainloop.c: verbosity changes
1392 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
1393 instead of aborting in one of the test codepaths
1395 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
1396 caused not printing the pid ever again if a verbose was missing
1397 the newline at the end
1398 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
1400 * dbus/dbus-connection.c: verbosity changes;
1401 (dbus_connection_has_messages_to_send): new function
1402 (_dbus_connection_message_sent): no longer call transport->messages_pending
1403 (_dbus_connection_send_preallocated_unlocked): do one iteration to
1404 try to write() immediately, so we can avoid the write watch. This
1405 is the core purpose of this patchset
1406 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
1407 dump the outgoing message queue, so nobody will get confused
1408 trying to send them or thinking stuff is pending to be sent
1410 * bus/test.c: verbosity changes
1412 * bus/driver.c: verbosity/assertion changes
1414 * bus/dispatch.c: a bunch of little tweaks to get it working again
1415 because this patchset changes when/where you need to block.
1417 2004-11-23 Havoc Pennington <hp@redhat.com>
1419 * test/glib/test-profile.c: modify to accept a plain_sockets
1420 argument in which case it will bench plain sockets instead of
1421 libdbus, for comparison purposes.
1423 2004-11-22 Havoc Pennington <hp@redhat.com>
1425 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
1426 threads for more time, so sysprof can get a grip on it.
1428 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
1431 2004-11-13 Havoc Pennington <hp@redhat.com>
1433 * test/glib/test-profile.c: fix this thing up a bit
1435 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
1436 preallocation sizes by a fair bit; not sure if this will be an
1437 overall performance win or not, but it does reduce reallocs.
1439 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
1440 the test hack that forced constant realloc if asserts are
1441 disabled, so we can profile sanely. Sprinkle in some
1442 _DBUS_UNLIKELY() which are probably pointless, but before I
1443 noticed the real performance problem I put them in.
1444 (_dbus_string_validate_utf8): micro-optimize this thing a little
1445 bit, though callgrind says it didn't help; then special-case
1446 ascii, which did help a lot; then be sure we detect nul bytes as
1447 invalid, which is a bugfix.
1448 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
1449 superstition; use memset to nul the padding instead of a manual
1451 (_dbus_string_get_length): inline this as a
1452 macro; it showed up in the profile because it's used for loop
1455 2004-11-10 Colin Walters <walters@verbum.org>
1457 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
1460 2004-11-09 Colin Walters <walters@verbum.org>
1462 * dbus/dbus-string.c (_dbus_string_get_length): New
1463 function, writes DBusString to C buffer.
1465 * dbus/dbus-string.h: Prototype it.
1467 * dbus/dbus-message.c (dbus_message_type_to_string): New
1468 function, converts message type into C string.
1470 * dbus/dbus-message.h: Prototype it.
1472 * bus/selinux.c (bus_selinux_check): Take source pid,
1473 target pid, and audit data. Pass audit data to
1475 (log_audit_callback): New function, appends extra
1477 (bus_selinux_allows_acquire_service): Also take
1478 service name, add it to audit data.
1479 (bus_selinux_allows_send): Also take message
1480 type, interface, method member, error name,
1481 and destination, and add them to audit data.
1482 (log_cb): Initialize func_audit.
1484 * bus/selinux.h (bus_selinux_allows_acquire_service)
1485 (bus_selinux_allows_send): Update prototypes
1487 * bus/services.c (bus_registry_acquire_service): Pass
1488 service name to bus_selinux_allows_acquire_service.
1490 * bus/bus.c (bus_context_check_security_policy): Pass
1491 additional audit data. Move assignment of dest
1494 2004-11-07 Colin Walters <walters@verbum.org>
1496 * dbus/dbus-transport-unix.c (do_authentication): Always
1497 initialize auth_completed.
1499 2004-11-07 Colin Walters <walters@verbum.org>
1501 * bus/bus.c (load_config): Break into three
1502 separate functions: process_config_first_time_only,
1503 process_config_every_time, and process_config_postinit.
1504 (process_config_every_time): Move call of
1505 bus_registry_set_service_context_table into
1506 process_config_postinit.
1507 (process_config_postinit): New function, does
1508 any processing that needs to happen late
1509 in initialization (and also on reload).
1510 (bus_context_new): Instead of calling load_config,
1511 open config parser here and call process_config_first_time_only
1512 and process_config_every_time directly. Later, after
1513 we have forked but before changing UID,
1514 invoke bus_selinux_full_init, and then call
1515 process_config_postinit.
1516 (bus_context_reload_config): As in bus_context_new,
1517 load parse file inside here, and call process_config_every_time
1518 and process_config_postinit.
1520 * bus/services.h, bus/services.c
1521 (bus_registry_set_service_context_table): Rename
1522 from bus_registry_set_sid_table. Take string hash from config
1523 parser, and convert them here into SIDs.
1525 * bus/config-parser.c (struct BusConfigParser): Have
1526 config parser only store a mapping of service->context
1528 (merge_service_context_hash): New function.
1529 (merge_included): Merge context string hashes instead
1530 of using bus_selinux_id_table_union.
1531 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
1532 simply create a new string hash.
1533 (bus_config_parser_unref): Unref it.
1534 (start_selinux_child): Simply insert strings into hash,
1535 don't call bus_selinux_id_table_copy_over.
1537 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
1538 (bus_selinux_id_table_copy_over): Delete.
1540 2004-11-03 Colin Walters <walters@verbum.org>
1542 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
1545 2004-11-03 Colin Walters <walters@verbum.org>
1547 * bus/test-main.c (test_pre_hook): Fix test logic,
1548 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
1550 2004-11-02 Colin Walters <walters@redhat.com>
1552 * bus/selinux.c (bus_selinux_init): Split into two functions,
1553 bus_selinux_pre_init and bus_selinux_post_init.
1554 (bus_selinux_pre_init): Just determine whether SELinux is
1556 (bus_selinux_post_init): Do everything else.
1558 * bus/main.c (main): Call bus_selinux_pre_init before parsing
1559 config file, and bus_selinux_post_init after. This ensures that
1560 we don't lose the policyreload notification thread that
1561 bus_selinux_init created before forking previously.
1563 * bus/test-main.c (test_pre_hook): Update for split.
1565 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
1567 Patch from Johan Fischer <linux@fischaz.com>
1569 * mono/doc/Makefile.am (install-data-local): Added directory
1572 2004-10-29 Colin Walters <walters@redhat.com>
1574 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
1575 parameter for fd to write pid to.
1577 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
1579 * bus/bus.c (bus_context_new): Pass print_pid_fd
1580 to _dbus_become_daemon (bug #1720)
1582 2004-10-29 Colin Walters <walters@redhat.com>
1584 Patch from Ed Catmur <ed@catmur.co.uk>
1586 * mono/doc/Makefile.am (install-data-local): Handle
1589 2004-10-29 Colin Walters <walters@redhat.com>
1591 * bus/.cvsignore, qt/.cvsignore: Update.
1593 2004-10-29 Colin Walters <walters@redhat.com>
1595 Patch from Kristof Vansant <de_lupus@pandora.be>
1597 * configure.in: Detect Slackware.
1598 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
1599 * bus/rc.messagebus.in: New file.
1601 2004-10-29 Colin Walters <walters@redhat.com>
1603 * tools/dbus-monitor.c (filter_func): Return
1604 DBUS_HANDLER_RESULT_HANDLED in filter function
1606 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
1608 2004-10-29 Colin Walters <walters@redhat.com>
1610 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
1612 * bus/services.c (bus_registry_acquire_service):
1613 Correctly retrieve service name from DBusString
1616 2004-10-29 Colin Walters <walters@redhat.com>
1618 * dbus/dbus-glib.h: Update documentation to not
1619 refer to internal APIs.
1621 2004-10-27 Joe Shaw <joeshaw@novell.com>
1623 * mono/Arguments.cs (GetDBusTypeConstructor):
1624 type.UnderlyingSystemType will return "System.Byte" if you do it
1625 on "byte[]", which is not what we want. So check the type.IsArray
1626 property and use System.Array instead.
1628 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
1630 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
1631 the DBusUserInfo structure since this is passed into the function.
1632 This would cause a double free when the function that allocated
1633 the structure would try to free it when an error occured.
1635 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
1636 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
1637 for service activation to avoid 32bit/64bit parallel install issues
1639 2004-10-21 Colin Walters <walters@verbum.org>
1641 * AUTHORS: Fix my email address, the @gnu.org one
1642 has been bouncing for some time. Also add J5.
1644 2004-10-21 Colin Walters <walters@verbum.org>
1646 * dbus/dbus-transport-unix.c (do_authentication): Return
1647 authentication status to callers.
1648 (unix_handle_watch): If we completed authentication this round,
1649 don't do another read. Instead wait until the next iteration,
1650 after we've read any pending data in the auth buffer.
1651 (unix_do_iteration): Ditto.
1652 (unix_handle_watch): Updated for new do_authentication prototype.
1654 2004-10-18 Colin Walters <walters@verbum.org>
1656 * bus/selinux.c (bus_selinux_enabled): Handle
1657 --disable-selinux case.
1659 2004-10-18 Colin Walters <walters@verbum.org>
1661 * bus/selinux.h: Add bus_selinux_enabled.
1663 * bus/selinux.c (bus_selinux_enabled): Implement it.
1665 * bus/config-parser.c (struct include): Add
1666 if_selinux_enabled member.
1667 (start_busconfig_child): Parse if_selinux_enabled
1668 attribute for include.
1669 (bus_config_parser_content): Handle it.
1671 * bus/session.conf.in, bus/system.conf.in: Add
1672 inclusion of context mapping to default config files;
1673 conditional on SELinux being enabled.
1675 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
1677 * test/data/invalid-config-files/badselinux-1.conf,
1678 test/data/invalid-config-files/badselinux-2.conf:
1679 Test files for bad syntax.
1681 2004-10-17 Colin Walters <walters@verbum.org>
1683 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
1684 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
1685 format specifier mismatches.
1687 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
1689 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
1692 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
1693 pointer (bug #1540, Leonardo Boiko).
1695 2004-09-28 Jon Trowbridge <trow@ximian.com>
1697 * mono/BusDriver.cs: Changed BusDriver struct to remove
1698 the ServiceCreated and ServiceDeleted events and replace them
1699 with the new ServiceOwnerChanged event.
1701 * mono/example/BusListener.cs: Added a new example program,
1702 which listens for and reports any ServiceOwnerChanged events
1705 * mono/example/Makefile.am (DESTDIR): Build changes for the
1706 new BusListener.cs example.
1708 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
1710 * bus/signals.c (bus_match_rule_parse): validate the components of
1711 match rules (bug #1439).
1713 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
1715 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
1717 * doc/dbus-specification.xml: document ServiceOwnerChanged
1720 * bus/driver.c, bus/driver.h, bus/services.c: Use
1721 ServiceOwnerChanged signal instead of ServiceCreated and
1724 * bus/dispatch.c: update testcase for the new signal.
1726 2004-09-20 Jon Trowbridge <trow@ximian.com>
1728 Patch from Nat Friedman <nat@novell.com>
1730 * mono/Makefile.am: A number of small build fixes to allow "make
1731 distcheck" to succeed.
1733 * mono/example/Makefile.am: "make distcheck" fixes.
1735 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
1738 * test/Makefile.am: "make distcheck" fixes.
1740 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
1742 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
1744 * doc/busconfig.dtd: update the DTD for the at_console attribute.
1746 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
1747 messages after the first one (bug #1389).
1749 * bus/dispatch.c (check_double_hello_message): add a test case for
1750 the double hello message bug.
1751 (check_existent_service_activation): fix check of spawning error.
1753 2004-09-16 David Zeuthen <david@fubar.dk>
1755 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
1757 2004-09-12 David Zeuthen <david@fubar.dk>
1759 Patch from Kay Sievers <kay.sievers@vrfy.org>
1761 * bus/bus.c (bus_context_new):
1763 * bus/main.c (usage)
1765 Add commandline option --nofork to override configuration file
1768 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
1770 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
1771 compilers don't like it (bug #974).
1773 2004-09-04 Harald Fernengel <harry@kdevelop.org>
1775 * qt/connection.*: Applied patch by Jérôme Lodewyck
1776 <lodewyck@clipper.ens.fr> to integrate an existing
1777 connection into the Qt eventloop
1779 2004-08-30 Jon Trowbridge <trow@ximian.com>
1781 * mono/BusDriver.cs: Added. This is a class for interacting with
1782 the org.freedesktop.DBus service.
1784 * mono/Message.cs: Added a mechanism to expose the message that is
1785 currently being dispatched via the static Message.Current
1786 property. Added Message.Sender and Message.Destination
1789 * mono/Handler.cs: Expose the dispatched message via
1790 Message.Current when handling method calls.
1792 * mono/Service.cs: Expose the dispatched message via
1793 Message.Current when handling signal emissions.
1795 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
1796 Connection.BaseService property.
1798 2004-08-28 Havoc Pennington <hp@redhat.com>
1800 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
1802 More fixes from Steve Grubb
1804 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
1805 (_dbus_listen_tcp_socket): fix fd leak
1807 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
1808 EINTR to a bit lower in the code
1810 2004-08-26 Jon Trowbridge <trow@ximian.com>
1812 * bus/driver.c (bus_driver_handle_service_exists): Respond with
1813 TRUE if we are inquiring about the existence of the built-in
1814 org.freedesktop.DBus service.
1816 2004-08-25 John Palmieri <johnp@redhat.com>
1817 * bus/config-parser.c:
1818 (struct PolicyType): Add POLICY_CONSOLE
1819 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
1820 (start_busconfig_child): Sets up console element when
1821 <policy at_console=""> is encountered in a policy file
1822 (append_rule_from_element): Convert console elements to console
1826 (bus_policy_create_client_policy): Add console rules to the client
1827 policy based on if the client is at the console
1828 (bus_policy_append_console_rule): New function for adding a
1829 console rule to a policy
1830 (bus_policy_merge): Handle console rule merging
1832 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
1833 where we check for console user files
1835 * dbus/dbus-sysdeps.c:
1836 (_dbus_file_exists): New function which checks if the given
1838 (_dbus_user_at_console): New function which does the system
1839 specific process of checking if the user is at the console
1841 * dbus/dbus-userdb.c:
1842 (_dbus_is_console_user): New function converts a UID to user name
1843 and then calls the system specific _dbus_user_at_console to
1844 see if the user is at the console and therefor a console user
1846 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
1848 * bus/config-parser.c (set_limit):
1849 * bus/dbus-daemon-1.1.in:
1850 * test/data/valid-config-files/many-rules.conf: set the
1851 max_match_rules_per_connection limt from the config file.
1853 * doc/busconfig.dtd: update the DTD.
1855 * bus/driver.c: remove some unused variables.
1857 2004-08-24 Mikael Hallendal <micke@imendio.com>
1859 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
1860 it's been replaced by dbus_g_bus_get
1862 2004-08-23 Colin Walters <walters@redhat.com>
1864 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
1866 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
1868 * bus/selinux.c: Create a thread for policy reload notification.
1869 (bus_selinux_get_policy_root): Implement.
1871 * bus/config-parser.c (start_busconfig_child)
1872 (bus_config_parser_content): Support SELinux-root relative
1875 * configure.in <HAVE_SELINUX>: Add -lpthread.
1877 * bus/test-main.c (test_pre_hook, test_post_hook): New.
1878 (test_post_hook): Move memory checking into here.
1879 (test_pre_hook, test_post_hook): Move SELinux checks in
1880 here, but conditional on a DBUS_TEST_SELINUX environment
1881 variable. Unfortunately we can't run the SELinux checks
1882 as a normal user, since they won't have any permissions
1883 for /selinux. So this will have to be tested manually
1884 for now, until we have virtualization for most of
1887 2004-08-23 Havoc Pennington <hp@redhat.com>
1889 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
1890 drop supplementary groups, suggested by Steve Grubb
1892 2004-08-20 Colin Walters <walters@redhat.com>
1894 * bus/config-parser.c (start_busconfig_child): Remove some unused
1897 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
1900 2004-08-17 Joe Shaw <joeshaw@novell.com>
1902 * configure.in: If --enable-mono is passed in, if we can't find
1905 * mono/Makefile.am: Use /gacutil to install assemblies into the
1908 2004-08-12 Havoc Pennington <hp@redhat.com>
1910 * NEWS: update for 0.22
1912 * configure.in: release 0.22
1914 2004-08-11 Colin Walters <walters@redhat.com>
1916 * tools/dbus-send.c (main, usage): Add --reply-timeout
1919 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
1921 * bus/bus.c (process_config_first_time_only): get rid of an unused
1922 DBusError that was causing a memoy leak (bug #989).
1924 * dbus/dbus-keyring.c, dbus/dbus-message.c:
1925 fix compilation on Solaris/Forte C (bug #974)
1927 * bus/main.c (main): plug two minuscule memleaks.
1929 2004-08-10 Havoc Pennington <hp@redhat.com>
1931 * doc/dbus-tutorial.xml: add some more info on GLib bindings
1933 2004-08-09 Havoc Pennington <hp@redhat.com>
1935 * COPYING: switch to Academic Free License version 2.1 instead of
1936 2.0, to resolve complaints about patent termination clause.
1938 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
1940 * README: added documentation for the --enable-python
1943 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
1945 * bus/config-parser.c (bus_config_parser_new): fix an invalid
1946 _unref in the SELinux support.
1948 * doc/busconfig.dtd: update DTD for SELinux support.
1950 * bus/config-loader-libxml.c: fix error handler and parser
1951 initialisation/cleanup. OOM test now works with libxml2 HEAD.
1953 * configure.in: remove the warning about libxml2.
1955 * dbus/dbus-bus.c: silence doxygen warning.
1957 2004-07-31 Colin Walters <walters@redhat.com>
1959 * configure.in: Move #error in SELinux check to its own line.
1961 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
1963 * dbus/dbus-internals.h (_DBUS_SET_OOM):
1964 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
1967 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
1968 broken by the change in the _SET_OOM macros.
1970 2004-07-31 Colin Walters <walters@redhat.com>
1972 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
1975 2004-07-31 Colin Walters <walters@redhat.com>
1977 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
1978 to correctly detect DBUS__ACQUIRE_SVC. Also add an
1981 2004-07-24 Havoc Pennington <hp@redhat.com>
1983 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
1985 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
1988 * configure.in: add --enable-selinux
1990 * bus/policy.c (bus_policy_merge): add FIXME to a comment
1992 * bus/main.c (main): initialize and shut down selinux
1994 * bus/connection.c: store SELinux ID on each connection, to avoid
1995 repeated getting of the string context and converting it into
1998 * bus/bus.c (bus_context_get_policy): new accessor, though it
2000 (bus_context_check_security_policy): check whether the security
2001 context of sender connection can send to the security context of
2002 recipient connection
2004 * bus/config-parser.c: add parsing for <selinux> and <associate>
2006 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
2007 implement dbus_connection_get_unix_fd()
2009 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
2010 function, used by the selinux stuff
2012 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
2014 * bus/config-loader-libxml.c: complete the implementation of
2015 libxml backend for config file loader. Doesn't work with full OOM
2018 * configure.in: change error when selecting libxml into a warning.
2020 * test/data/invalid-config-files: add two non-well-formed XML
2023 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
2025 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
2026 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
2027 be necessary to read all the buffer. (bug #894)
2029 * bus/activation.c (bus_activation_activate_service): fix a
2030 potential assertion failure (bug #896). Small optimization in the
2031 case of auto-activation messages.
2033 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
2034 add test case for byte-through-vararg bug (#901). patch by Kimmo
2037 2004-07-28 Anders Carlsson <andersca@gnome.org>
2040 * python/dbus_bindings.pyx.in:
2041 Add dbus.init_gthreads (), allow emit_signal to pass
2042 arguments to the signal.
2044 2004-07-24 Havoc Pennington <hp@redhat.com>
2046 * AUTHORS: add some people, not really comprehensively, let me
2047 know if I missed you
2049 2004-07-24 Havoc Pennington <hp@redhat.com>
2051 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
2054 * test/Makefile.am (DIST_SUBDIRS): here also
2056 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
2058 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
2059 breaking build on Solaris, reported by Farhad Saberi on the ML.
2061 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
2062 va_arg invocation to account for integer promotion in the case of
2063 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
2065 * bus/services.c (bus_service_remove_owner): fix bug #902, use
2066 _dbus_list_get_first_link, not _dbus_list_get_first.
2068 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
2070 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
2071 handler functions so that the asserts in _dbus_object_subtree_unref
2074 * dbus/dbus-transport-unix.c (do_reading):
2075 _dbus_transport_queue_messages return value is of type
2076 dbus_bool_t, not DBusDispatchStatus.
2078 2004-07-19 David Zeuthen <david@fubar.dk>
2080 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
2083 (check_get_connection_unix_user): Debug says GetProperty; but the
2084 method is called GetConnectionUnixUser
2085 (check_get_connection_unix_process_id): New function
2086 (bus_dispatch_test): Actually call check_get_connection_unix_user();
2087 also call check_get_connection_unix_process_id()
2090 (bus_driver_handle_get_connection_unix_process_id): New function,
2091 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
2095 (handle_server_data_external_mech): Set pid from the credentials
2096 obtained from the socket
2098 * dbus/dbus-connection.c:
2099 (dbus_connection_get_unix_process_id): New function
2101 * dbus/dbus-connection.h:
2102 Add prototype for dbus_connection_get_unix_process_id
2104 * dbus/dbus-transport.c:
2105 (_dbus_transport_get_unix_process_id): New function
2107 * dbus/dbus-transport.h:
2108 Add prototype for _dbus_transport_get_unix_process_id
2110 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
2112 * dbus/dbus-message.c: Message counter fix, patch by Christian
2113 Hammond <chipx86@gnupdate.org>
2115 2004-07-18 Seth Nickell <seth@gnome.org>
2118 * python/dbus_bindings.pyx.in:
2119 * python/tests/test-client.py:
2121 Add dbus.ByteArray and dbus_bindings.ByteArray
2122 types so that byte streams can be passed back.
2124 Give jdahlin the heaps of credit that are so
2127 2004-07-12 Seth Nickell <seth@gnome.org>
2131 Add message argument to the default object_method_handler
2134 * python/dbus_bindings.pyx.in:
2136 Automatically return NIL when passed an empty list
2137 (we can't pass back a list since lists are typed
2138 and we don't have any idea what type the the client
2139 intended the list to be... :-( )
2141 2004-07-10 Seth Nickell <seth@gnome.org>
2143 * python/examples/Makefile.am:
2145 Fix distcheck breakage caused by new examples.
2147 2004-07-10 Seth Nickell <seth@gnome.org>
2151 Add "message" argument to service-side dbus.Object
2152 methods. This will break existing services written
2153 using the python bindings, but will allow extraction
2154 of all the message information (e.g. who its from).
2156 Add improved "object oriented" signal handling/emission.
2158 * python/examples/example-service.py:
2162 * python/examples/example-signal-emitter.py:
2163 * python/examples/example-signal-recipient.py:
2165 Two new examples that show how to emit and receive
2166 signals using the new APIs.
2168 * python/examples/example-signals.py:
2169 * python/examples/gconf-proxy-service.py:
2170 * python/examples/gconf-proxy-service2.py:
2172 Add "message" argument to service methods.
2174 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
2176 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
2177 * dbus/bus.c (dbus_bus_get_unix_user)
2178 * doc/dbus-specification.xml: implement GetConnectionUnixUser
2179 method of org.freedesktop.DBus interface.
2181 * bus/dispatch.c: test case
2183 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
2185 * python/Makefile.am: switched include directory from glib/ to dbus/
2186 since dbus-glib.h moved
2188 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
2190 * configure.in: prevent building the gcj stuff and libxml loader
2191 since they are broken.
2193 2004-06-20 Havoc Pennington <hp@redhat.com>
2195 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
2196 codes from the dbus error names
2198 * glib/dbus-glib.h: move to subdir dbus/ since it's included
2199 as dbus/dbus-glib.h and that breakage is now visible due to
2200 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
2202 * glib/dbus-glib.h: s/gproxy/g_proxy/
2204 * dbus/dbus-shared.h: new header to hold stuff shared with
2207 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
2210 * glib/dbus-glib.h (dbus_set_g_error): move to
2211 dbus-glib-lowlevel.h
2213 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
2214 of stuff to enable this
2216 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
2218 * a bunch of other changes with the same basic "separate glib
2219 bindings from dbus.h" theme
2221 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
2223 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
2225 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
2227 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
2229 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
2230 the reply value of the ServiceExists message.
2232 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
2234 * python/dbus_bindings.pyx.in: No longer need to parse path
2235 elements and pass them as arrays of strings. The C API now
2236 accepts plain path strings.
2237 (_build_parsed_path): removed
2239 2004-06-07 Havoc Pennington <hp@redhat.com>
2241 * doc/TODO: remove auto-activation item since it's done; sort
2242 items by importance/milestone
2244 2004-06-07 Havoc Pennington <hp@redhat.com>
2246 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
2247 random signature when using REQUIRED_FIELDS (this hack won't work
2250 * dbus/dbus-message.c: change the signature to be a header field,
2251 instead of message->signature special-case string. Incremental
2252 step forward. Then we can fix up code to send the signature in the
2253 message, then fix up code to validate said signature, then fix up
2254 code to not put the typecodes inline, etc.
2255 (load_one_message): don't make up the signature after the fact
2256 (decode_header_data): require signature field for the known
2259 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
2261 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
2263 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
2265 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
2267 * mono/Handler.cs: Updated to follow new path argument for
2268 (un-)registering objects.
2270 * mono/example/Makefile.am:
2272 * configure.in: Bumped required version for mono and use new -pkg
2275 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
2277 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
2278 registration functions take the path argument as char* instead of
2281 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
2282 split off the path decompostion part of
2283 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
2286 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
2288 2004-06-02 Kristian Høgsberg <krh@redhat.com>
2290 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
2291 machine approach. A state is implemented as a function that
2292 handles incoming events as specified for that state.
2294 * doc/dbus-specification.xml: Update auth protocol state machine
2295 specification to match implementation. Remove some leftover
2298 2004-06-02 Kristian Høgsberg <krh@redhat.com>
2300 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
2301 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
2304 * Doxyfile.in: remove deprecated options.
2306 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
2307 glib/test-thread.h, glib/test-thread-client.c,
2308 glib/test-thread-server.c, glib/test-profile.c,
2309 glib/test-dbus-glib.c: remove these unused files.
2311 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
2313 * dbus/dbus-object-tree.c
2314 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
2315 non-fallback handlers (bug #684).
2316 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
2317 (find_subtree_recurse): report wether the returned subtree is an
2318 exact match or a "fallback" match higher up in the tree.
2319 (object_tree_test_iteration): update test case.
2321 2004-06-01 Seth Nickell <seth@gnome.org>
2323 * python/dbus_bindings.pyx.in:
2324 * python/tests/test-client.py:
2326 Round off basic type support. Add dicts (yay!), and
2327 remaining array types.
2329 Make MessageIter more general so it works for dicts too.
2331 Mark all loop variables as C integers.
2333 2004-05-31 Havoc Pennington <hp@redhat.com>
2335 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
2338 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
2340 * glib/dbus-glib-tool.c (main): set up to have a --self-test
2341 option that runs the tests, and start filling in some code
2342 including for starters just dumping the interfaces to stdout
2344 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
2346 * test/data/valid-introspection-files/lots-of-types.xml: test of
2347 an example introspection file
2349 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
2352 2004-05-31 Seth Nickell <seth@gnome.org>
2354 * python/dbus_bindings.pyx.in:
2355 * python/tests/test-client.py:
2360 Fix string array memory trashing bug... oops...
2362 2004-05-30 Seth Nickell <seth@gnome.org>
2366 Add a nicer-but-less-flexible alternate API for handling
2367 calls to virtual objects in dbus.ObjectTree.
2369 Screw up the argument order to the dbus.Object constructor
2370 for consistency with dbus.ObjectTree (and to make dbus_methods
2371 optional for future extension)
2373 * python/examples/Makefile.am:
2374 * python/examples/gconf-proxy-service.py:
2375 * python/examples/gconf-proxy-service2.py:
2377 Alternate implementation of gconf-proxy-service using the
2378 nicer dbus.ObjectTree API.
2380 * python/examples/example-service.py:
2381 * python/tests/test-server.py
2383 Reverse the argument order to deal with dbus.Object constructor
2386 2004-05-30 Seth Nickell <seth@gnome.org>
2388 * python/examples/example-client.py:
2389 * python/examples/example-service.py:
2391 Take it back. Lists seem to work but they're broken
2392 in the test suite. Make the base examples use
2395 2004-05-30 Seth Nickell <seth@gnome.org>
2397 * python/dbus_bindings.pyx.in:
2398 * python/tests/test-client.py:
2400 Add some more tests and fix errors that crop up.
2401 Unfortunately, currently it seems like marshalling
2402 and unmarshalling of lists is completely broken :-(
2404 2004-05-30 Seth Nickell <seth@gnome.org>
2406 * python/dbus_bindings.pyx.in:
2408 Add support for ObjectPath type.
2412 Refactor message handling code to a common function.
2414 * python/tests/test-client.py:
2415 * python/tests/test-server.py:
2417 Add tests that check to make sure values of all types
2418 can be echoed from a service w/o mangling.
2420 2004-05-29 Seth Nickell <seth@gnome.org>
2424 Add ObjectTree class which allows implementation
2425 of trees of "virtual" objects. Basically the python
2426 wrapper for "register_fallback".
2428 * python/examples/Makefile.am
2429 * python/examples/gconf-proxy-client.py:
2430 * python/examples/gconf-proxy-service.py:
2432 Implement a simple GConf proxy service that supports
2433 get/set on string and int GConf keys using the ObjectTree.
2435 2004-05-29 Seth Nickell <seth@gnome.org>
2438 * python/examples/example-client.py:
2439 * python/examples/example-service.py:
2440 * python/examples/list-system-services.py:
2442 Add SessionBus, SystemBus and ActivationBus classes
2443 so you don't need to know the special little BUS_TYPE
2446 2004-05-29 Havoc Pennington <hp@redhat.com>
2448 * bus/config-parser.c (process_test_valid_subdir): temporarily
2449 stop testing config parser OOM handling, since expat has issues
2450 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
2452 * bus/dbus-daemon-1.1.in: change requested_reply to
2453 send_requested_reply/receive_requested_reply so we can send the
2454 replies, not just receive them.
2456 * bus/config-parser.c: parse the new
2457 send_requested_reply/receive_requested_reply
2459 * bus/policy.c (bus_client_policy_check_can_send): add
2460 requested_reply argument and use it
2462 * bus/bus.c (bus_context_check_security_policy): pass through
2463 requested_reply status to message send check
2465 * bus/system.conf.in: adapt to requested_reply change
2467 2004-05-28 Havoc Pennington <hp@redhat.com>
2469 * test/glib/test-service-glib.c (main): remove unused variable
2471 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
2473 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
2474 from the enum, no longer in use.
2476 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
2479 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
2480 whether error_name passed in is a valid error name.
2482 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
2484 * dbus/dbus-message.c (dbus_message_get_args): Added support for
2485 OBJECT_PATH and OBJECT_PATH_ARRAY
2487 2004-05-28 Seth Nickell <seth@gnome.org>
2489 * python/examples/Makefile.am:
2491 Forget to add Makefile.am. Do not pass go.
2493 2004-05-28 Michael Meeks <michael@ximian.com>
2495 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
2498 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
2500 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
2501 (_dbus_message_iter_get_basic_type_array): impl.
2502 drastically simplify ~all relevant _get methods to use these.
2503 (_dbus_message_iter_append_basic_array),
2504 (dbus_message_iter_append_basic): impl
2505 drastically simplify ~all relevant _append methods to use these.
2507 * dbus/dbus-message-builder.c (parse_basic_type)
2508 (parse_basic_array, lookup_basic_type): impl.
2509 (_dbus_message_data_load): prune scads of duplicate /
2512 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
2513 (_dbus_demarshal_basic_type): implement,
2514 (demarshal_and_validate_len/arg): beef up debug.
2515 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
2517 2004-05-27 Seth Nickell <seth@gnome.org>
2520 * python/Makefile.am:
2522 Include the example python apps in the tarball.
2524 * python/examples/list-system-services.py
2526 Add a python new example that fetches the list of services
2527 from the system bus.
2529 2004-05-27 Seth Nickell <seth@gnome.org>
2532 * python/dbus_bindings.pyx.in:
2534 Fix failure to notify that a signal was not handled,
2535 resulted in hung functions.
2537 2004-05-25 Colin Walters <walters@redhat.com>
2539 * tools/dbus-monitor.c (main): Monitor all types of messages.
2541 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
2543 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
2544 which unregisters the object path and disposes the handler.
2546 2004-05-23 Kristian Høgsberg <krh@redhat.com>
2548 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
2550 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
2551 operands to && so we call dbus_message_iter_next () for the last
2554 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2556 * dbus/dbus-object-tree.c
2557 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
2558 children even if the requested path isn't registered.
2559 (object_tree_test_iteration): test object_tree_list_registered.
2561 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
2564 2004-05-20 Kristian Høgsberg <krh@redhat.com>
2566 * doc/TODO: Remove resolved items.
2568 * bus/expirelist.h (struct BusExpireList): remove unused n_items
2571 * bus/connection.c (bus_connections_expect_reply): Enforce the
2572 per-connection limit on pending replies.
2574 Patch from Jon Trowbridge <trow@ximian.com>:
2576 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
2577 up a watch that triggers a config reload when one end of the pipe
2579 (signal_handler): Instead of doing the config reload in our SIGHUP
2580 handler, just write to the reload pipe and let the associated
2581 watch handle the reload when control returns to the main loop.
2583 * bus/driver.c (bus_driver_handle_reload_config): Added.
2584 Implements a ReloadConfig method for requesting a configuration
2585 file reload via the bus driver.
2587 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
2589 * HACKING: Updated release instructions concerning the wiki page.
2591 2004-05-18 Kristian Høgsberg <krh@redhat.com>
2593 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
2594 filter against auth->allowed_mechs; we only add allowed mechs in
2595 record_mechanisms().
2597 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
2598 ALLOWED_MECHS to auth-script format so we can set the list of
2601 * data/auth/client-out-of-mechanisms.auth-script: New test to
2602 check client disconnects when it is out of mechanisms to try.
2604 * dbus/dbus-auth.c (process_command): Remove check for lines
2605 longer that 1 MB; we only buffer up maximum 16 kB.
2607 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2608 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
2609 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
2610 assume there might be unused bytes.
2612 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
2613 client-out-of-mechs, it is handled in process_reject(). Move check
2614 for max failures to send_rejected(), as it's a server-only thing.
2616 * dbus/dbus-auth.c: Factor out protocol reply code into functions
2617 send_auth(), send_data(), send_rejected(), send_error(),
2618 send_ok(), send_begin() and send_cancel().
2620 2004-05-17 Kristian Høgsberg <krh@redhat.com>
2622 Remove base64 encoding, replace with hex encoding. Original patch
2623 from trow@ximian.com, added error handling.
2625 * dbus/dbus-string.c (_dbus_string_base64_encode)
2626 (_dbus_string_base64_decode): Remove.
2627 (_dbus_string_hex_decode): Add end_return argument so we can
2628 distinguish between OOM and invalid hex encoding.
2629 (_dbus_string_test): Remove base64 tests and add test case for
2632 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
2633 Replace base64 with hex.
2635 * test/data/auth/invalid-hex-encoding.auth-script: New test case
2636 for invalid hex encoded data in auth protocol.
2638 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
2640 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
2643 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
2645 * mono/dbus-sharp.dll.config.in: Added for GAC
2646 * mono/dbus-sharp.snk: Added for GAC
2647 * mono/Assembly.cs.in: Added for GAC
2648 * mono/Makefile.am: Changes for GAC installation
2649 * configure.in: Added refs for dbus-sharp.dll.config.in and
2650 Assembly.cs.in. More fixes for mono testing
2651 * mono/example/Makefile.am: Changed var to CSC
2652 * Makefile.am: Changed flag name to DBUS_USE_CSC
2654 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
2656 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
2657 * mono/doc/*: Added documentation framework
2658 * configure.in: Added monodoc check
2659 * README: Added description of mono configure flags
2661 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
2663 * doc/dbus-specification.xml: Added a "Required" column to the
2664 header fields table and changed the "zero or more" verbage in
2665 the above paragraph to read "The header must contain the required
2666 named header fields and zero or more of the optional named header
2668 * test/data/invalid-messages/*.message: Added the required PATH
2669 named header field to the tests so that they don't fail on
2670 'Missing path field'
2672 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
2674 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
2675 the stack by implicitly defining variable and parameter types and
2676 removing the hack of defining C pointers as python objects and later
2679 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
2681 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
2683 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
2685 * mono/DBusType/Dict.cs: Handle empty dicts
2686 * mono/DBusType/Array.cs: Handle empty arrays
2687 * mono/Arguments.cs: Handle empty arguments
2689 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
2691 * dbus-sharp.pc.in: Modified to include include Libs and Requires
2694 2004-04-25 Kristian Høgsberg <krh@redhat.com>
2696 * test/data/valid-messages/standard-*.message: Update message
2697 test scripts to new header field names.
2699 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
2701 * test/break-loader.c (randomly_do_n_things): tracked down buffer
2702 overflow to times_we_did_each_thing array which would chop off the
2703 first character of the failure_dir string. Increased the size of
2704 the array to 7 to reflect the number of random mutation functions
2707 2004-04-21 Kristian Høgsberg <krh@redhat.com>
2709 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
2710 unix_server->watch here, it is unreffed in disconnect.
2711 (_dbus_server_new_for_tcp_socket): convert NULL host to
2712 "localhost" here so we don't append NULL to address.
2714 * dbus/dbus-server.c (_dbus_server_test): Add test case for
2715 various addresses, including tcp with no explicit host.
2717 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2719 * dbus/dbus-message.c (decode_header_data, decode_string_field):
2720 fix incorrect setting of .name_offset in the HeaderField (it was
2721 off by two bytes, positioned right after the name and typecode)
2723 * bus/bus.c (bus_context_new, bus_context_unref): test before
2724 calling dbus_server_free_data_slot and _dbus_user_database_unref
2725 in case of an error.
2727 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
2730 2004-04-19 Kristian Høgsberg <krh@redhat.com>
2732 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
2733 _dbus_poll() instead of select().
2735 2004-04-15 Jon Trowbridge <trow@ximian.com>
2737 * bus/main.c (signal_handler): Reload the configuration files
2739 (main): Set up our SIGHUP handler.
2741 * bus/bus.c (struct BusContext): Store the config file, user and
2742 fork flag in the BusContext.
2743 (process_config_first_time_only): Added. Contains the code
2744 (previously in bus_context_new) for setting up the BusContext from
2745 the BusConfigParser that should only be run the first time the
2746 config files are read.
2747 (process_config_every_time): Added. Contains the code (previously
2748 in bus_context_new) for setting up the BusContext from the
2749 BusConfigParser that should be run every time the config files are
2751 (load_config): Added. Builds a BusConfigParser from the config
2752 files and passes the resulting structure off to
2753 process_config_first_time_only (assuming this is the first time)
2754 and process_config_every_time.
2755 (bus_context_new): All of the config-related code has been moved
2756 to process_config_first_time_only and process_config_every_time.
2757 Now this function just does the non-config-related initializations
2758 and calls load_config.
2759 (bus_context_reload_config): Added.
2761 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
2763 * bus/driver.c (bus_driver_handle_get_service_owner):
2764 implement a GetServiceOwner method.
2765 * doc/dbus-specification.xml: document it.
2766 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
2768 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
2769 implement, using the bus GetServiceOwner method.
2771 * test/glib/test-dbus-glib.c:
2772 use dbus_gproxy_new_for_service_owner so that we can receive the
2775 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
2777 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
2778 dbus/dbus-message.c, dbus/dbus-protocol.h
2779 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
2781 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
2782 dbus/dbus-message.c, dbus/dbus-protocol.h
2783 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
2785 * dbus/dbus-internals.c (_dbus_header_field_to_string):
2786 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
2787 DBUS_HEADER_FIELD_SENDER resolves to "sender"
2789 * doc/dbus-specification.xml (Header Fields Table):
2790 s/SERVICE/DESTINATION
2791 s/SENDER_SERVICE/SENDER
2794 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
2796 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
2799 2004-04-13 Michael Meeks <michael@ximian.com>
2801 * glib/dbus-gobject.c (handle_introspect): split out
2802 (introspect_properties): this.
2803 (handle_introspect): implement this.
2805 * test/glib/Makefile.am: use the absolute path so the bus
2806 daemon's chdir ("/") doesn't kill us dead.
2808 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
2810 2004-04-12 Jon Trowbridge <trow@ximian.com>
2812 * bus/config-parser.c (struct BusConfigParser): Added
2813 included_files field.
2814 (seen_include): Added. Checks whether or not a file has already
2815 been included by any parent BusConfigParser.
2816 (bus_config_parser_new): Copy the parent's included_files.
2817 (include_file): Track which files have been included, and fail on
2818 circular inclusions.
2819 (process_test_valid_subdir): Changed printf to report if we are
2820 testing valid or invalid conf files.
2821 (all_are_equiv): Changed printf to be a bit clearer about
2822 what we are actually doing.
2823 (bus_config_parser_test): Test invalid configuration files.
2825 2004-04-09 Jon Trowbridge <trow@ximian.com>
2827 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
2828 argument. If non-null, the newly-constructed BusConfigParser will
2829 be initialized with the parent's BusLimits instead of the default
2831 (include_file): When including a config file, pass in
2832 the current parser as the parent and then copy the BusLimits
2833 from the included BusConfigParser pack to the current parser.
2834 (process_test_valid_subdir): Renamed from process_test_subdir.
2835 (process_test_equiv_subdir): Added. Walks through a directory,
2836 descending into each subdirectory and loading the config files
2837 it finds there. If any subdirectory contains two config files
2838 that don't produce identical BusConfigParser structs, fail.
2839 For now, the BusConfigParser's BusPolicies are not compared.
2840 (bus_config_parser_test): Call both process_test_valid_subdir and
2841 process_test_equiv_subdir.
2843 * bus/config-loader-libxml.c (bus_config_load): Take a parent
2844 argument and pass it along to the call to bus_config_parser_new.
2845 Also made a few small changes to allow this code to compile.
2847 * bus/config-loader-expat.c (bus_config_load): Take a parent
2848 argument and pass it along to the call to bus_config_parser_new.
2850 * bus/bus.c (bus_context_new): Load the config file
2851 with a NULL parent argument.
2853 2004-03-29 Michael Meeks <michael@ximian.com>
2855 * glib/dbus-gobject.c (introspect_properties): split
2856 out, fix mangled 'while' flow control.
2857 (introspect_signals): implement.
2858 (handle_introspect): update.
2860 2004-03-29 Michael Meeks <michael@ximian.com>
2862 * glib/dbus-gobject.c (set_object_property): split out /
2863 re-work, use the property type, and not the message type(!)
2864 (get_object_property): ditto.
2866 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
2867 (dbus_gvalue_marshal): make this code re-usable, needed
2868 for signals too, also on both proxy and server side.
2869 Re-write for more efficiency / readability.
2871 2004-03-29 Michael Meeks <michael@ximian.com>
2873 * dbus/dbus-message.c
2874 (dbus_message_new_error_printf): impl.
2876 * dbus/dbus-connection.c
2877 (dbus_connection_unregister_object_path): fix warning.
2879 * configure.in: fix no-mono-installed situation.
2881 2004-03-27 Havoc Pennington <hp@redhat.com>
2883 Patch from Timo Teräs:
2885 * tools/dbus-send.c (main): if --print-reply, assume type is
2886 method call; support boolean type args
2888 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
2889 bunch of memleak and logic bugs
2891 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
2893 * mono/Arguments.cs:
2894 * mono/Introspector.cs:
2896 * mono/InterfaceProxy.cs:
2898 * mono/ProxyBuilder.cs:
2900 Added InterfaceProxy class to avoid building proxies for every
2904 * dbus-message.c (dbus_message_append_args_valist)
2905 (dbus_message_iter_get_object_path)
2906 (dbus_message_iter_get_object_path_array)
2907 (dbus_message_iter_append_object_path)
2908 (dbus_message_iter_append_object_path_array):
2909 Added object_path iter functions to handle OBJECT_PATH arguments
2911 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
2913 First checkin of mono bindings.
2916 Build stuff for the bindings
2917 * dbus-sharp.pc.in: Added for pkgconfig
2919 2004-03-21 Havoc Pennington <hp@redhat.com>
2921 * test/test-service.c (main): remove debug spew
2923 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2925 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
2928 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
2929 (dbus_message_iter_init_array_iterator)
2930 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
2931 indicate whether the iterator is empty
2933 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
2936 2004-03-19 Havoc Pennington <hp@redhat.com>
2938 * NEWS: 0.21 updates
2940 * configure.in: 0.21
2942 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
2944 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
2945 you don't need pyrex to make dist
2947 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
2950 2004-03-18 Richard Hult <richard@imendio.com>
2952 * dbus/dbus-message.c (dbus_message_get_auto_activation)
2953 (dbus_message_set_auto_activation): Add doxygen docs.
2955 2004-03-16 Richard Hult <richard@imendio.com>
2957 * bus/activation.c: (bus_activation_service_created),
2958 (bus_activation_send_pending_auto_activation_messages),
2959 (bus_activation_activate_service):
2961 * bus/dispatch.c: (bus_dispatch),
2962 (check_nonexistent_service_auto_activation),
2963 (check_service_auto_activated),
2964 (check_segfault_service_auto_activation),
2965 (check_existent_service_auto_activation), (bus_dispatch_test):
2966 * bus/driver.c: (bus_driver_handle_activate_service):
2967 * bus/services.c: (bus_registry_acquire_service):
2968 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
2969 (dbus_message_get_auto_activation):
2970 * dbus/dbus-message.h:
2971 * dbus/dbus-protocol.h: Implement auto-activation.
2973 * doc/dbus-specification.xml: Add auto-activation to the spec.
2975 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
2977 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
2978 fix a bug with CUSTOM types.
2980 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
2981 a unit test for this bug (used to fail).
2983 2004-03-12 Mikael Hallendal <micke@imendio.com>
2986 (babysitter_watch_callback): notify all pending activations waiting for
2987 the same exec that the activation failed.
2988 (bus_activation_activate_service): shortcut the activation if we
2989 already waiting for the same executable to start up.
2991 2004-03-12 Mikael Hallendal <micke@imendio.com>
2994 - Added service file reloading.
2995 Each service files directory is kept in an hash table in
2996 BusActivation and each BusActivationEntry knows what .service-file it
2997 was read from. So when you try to activate a service the bus will
2998 check if it's been updated, removed or if new .service-files has
3000 - Test code at the bottom for the service file reloading.
3001 * bus/test-main.c: (main):
3003 - added service reloading test.
3004 * dbus/dbus-sysdeps.c:
3005 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
3007 2004-03-08 Michael Meeks <michael@ximian.com>
3009 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
3010 bail immediately if disconnected, to avoid busy loop.
3012 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
3013 cleanup cut/paste/inefficiency.
3015 2004-03-01 David Zeuthen <david@fubar.dk>
3017 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
3018 bug where args were used twice. This bug resulted in a segfault
3019 on a Debian/PPC system when starting the messagebus daemon. Include
3020 dbus-sysdeps.h for DBUS_VA_COPY
3022 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
3024 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
3025 appropriate va_copy implementation. From GLib
3027 2004-02-24 Joe Shaw <joe@ximian.com>
3029 * bus/services.c (bus_registry_acquire_service): We need to pass
3030 in the service name to dbus_set_error() to prevent a crash.
3032 2003-12-26 Anders Carlsson <andersca@gnome.org>
3034 * AUTHORS: Reveal my True identity.
3036 2003-12-17 Mikael Hallendal <micke@imendio.com>
3038 * dbus/dbus-message.c: (dbus_message_append_args_valist):
3039 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
3041 2003-12-13 Mikael Hallendal <micke@imendio.com>
3043 * doc/TODO: Added not about better error check of configuration files.
3045 2003-12-02 Richard Hult <richard@imendio.com>
3047 * Update AFL version to 2.0 throughout the source files to reflect
3048 the update that was done a while ago.
3050 2003-12-02 Richard Hult <richard@imendio.com>
3052 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
3053 wrote_dict_key to FALSE on the iter that the dict is appended to,
3054 just like when appending other types. Fixes a bug where a dict
3055 couldn't be put inside a dict.
3056 (dbus_message_iter_append_dict_key): Fix typo in warning message.
3057 (message_iter_test, _dbus_message_test): Add test case for dict
3060 2003-12-01 David Zeuthen <david@fubar.dk>
3062 * python/dbus.py: Add the actual message when calling the reciever
3063 of a signal such that parameters can be inspected. Add the method
3064 remove_signal_receiver
3066 2003-11-26 Mikael Hallendal <micke@imendio.com>
3070 * glib/*.[ch]: Made ref functions return the pointer
3072 2003-11-25 Zack Rusin <zack@kde.org>
3074 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
3076 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
3079 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
3080 the Integrator and to better fit with the server,
3082 2003-11-24 Zack Rusin <zack@kde.org>
3084 * qt/connection.h, qt/connection.cpp: removing initDbus method since
3085 the integrator handles it now
3087 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
3088 since QTimer wasn't really meant to be used the way DBusTimeout is
3090 2003-11-24 Zack Rusin <zack@kde.org>
3092 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
3093 Integrator class which integrates D-BUS with the Qt event loop,
3095 * qt/connection.h, qt/connection.cpp: Move all the code which
3096 was dealing with D-BUS integration to the Integrator class,
3097 and start using Integrator,
3099 2003-11-23 Zack Rusin <zack@kde.org>
3101 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
3104 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
3105 switching namespaces to DBusQt, reworking the class,
3107 * Makefile.cvs: switching dependencies so that it matches KDE
3110 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
3113 2003-11-19 Havoc Pennington <hp@redhat.com>
3117 * configure.in: bump version to 0.20
3119 * configure.in (have_qt): add yet another place to look for qt
3120 (someone hand trolltech a .pc file...)
3122 2003-11-01 Havoc Pennington <hp@redhat.com>
3124 * doc/dbus-specification.xml: add state machine docs on the auth
3125 protocol; just a first draft, I'm sure it's wrong.
3127 2003-10-28 David Zeuthen <david@fubar.dk>
3129 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
3130 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
3132 2003-10-28 Havoc Pennington <hp@redhat.com>
3134 * dbus/dbus-message.c (get_next_field): delete unused function
3136 2003-10-28 Havoc Pennington <hp@redhat.com>
3138 * bus/expirelist.c (do_expiration_with_current_time): detect
3139 failure of the expire_func due to OOM
3141 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
3143 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
3144 NoReply error that's now created by the bus when the service exits
3146 2003-10-28 Havoc Pennington <hp@redhat.com>
3148 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
3149 tests for set_path, set_interface, set_member, etc.
3151 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
3153 * dbus/dbus-message.c (set_string_field): always just delete and
3154 re-append the field; accept NULL for deletion
3155 (re_align_fields_recurse): reimplement
3157 2003-10-26 Havoc Pennington <hp@redhat.com>
3159 * dbus/dbus-connection.c: fix docs to properly describe the
3160 disconnected message
3161 (_dbus_connection_notify_disconnected): remove this function;
3162 we can't synchronously add the disconnected message, we have to
3163 do it after we've queued any remaining real messages
3164 (_dbus_connection_get_dispatch_status_unlocked): queue the
3165 disconnect message only if the transport has finished queueing all
3166 its real messages and is disconnected.
3167 (dbus_connection_disconnect): update the dispatch status here
3169 2003-10-22 Havoc Pennington <hp@redhat.com>
3171 * bus/bus.c (bus_context_check_security_policy): fix up assertion
3173 * bus/connection.c (bus_transaction_send_from_driver): set the
3174 destination to the connection's base service
3176 2003-10-20 Havoc Pennington <hp@redhat.com>
3178 hmm, make check is currently not passing.
3180 * doc/dbus-specification.xml: add requirement that custom type
3181 names follow the same rules as interface names.
3183 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
3184 duplication and allow 'c' to be 'custom'; dict is now 'm' for
3187 * doc/dbus-specification.xml: update type codes to match
3188 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
3189 CUSTOM. Add type OBJECT_PATH to the spec.
3191 2003-10-17 Havoc Pennington <hp@redhat.com>
3193 * bus/driver.c (create_unique_client_name): use "." as separator
3194 in base service names instead of '-'
3196 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
3197 byte at the end of the string
3199 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
3200 optimization macros since string validation seems to be a slow
3203 * doc/dbus-specification.xml: restrict valid
3204 service/interface/member/error names. Add test suite code for the
3207 * dbus/dbus-string.c: limit service/interface/member/error names
3210 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
3211 format arg to verbose spew
3213 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
3214 memory, return instead of g_error
3216 * test/test-service.c (path_message_func): support emitting a
3219 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
3220 activation bus type if DBUS_BUS_ACTIVATION was set; default to
3221 assuming the activation bus was the session bus so that services
3222 started manually will still register.
3223 (init_connections_unlocked): fix so that in OOM situation we get
3224 the same semantics when retrying the function
3226 * test/test-service.c (main): change to use path registration, to
3227 test those codepaths; register with DBUS_BUS_ACTIVATION rather
3228 than DBUS_BUS_SESSION
3230 2003-10-16 Havoc Pennington <hp@redhat.com>
3232 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
3234 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
3235 coverage of the tests
3236 (coverage-report.txt): don't move the .da and .bbg files around
3238 2003-10-16 Havoc Pennington <hp@redhat.com>
3240 * bus/bus.c (struct BusContext): remove struct field I didn't mean
3243 2003-10-16 Havoc Pennington <hp@redhat.com>
3245 * bus/connection.c (bus_pending_reply_expired): either cancel or
3247 (bus_connections_check_reply): use unlink, not remove_link, as we
3248 don't want to free the link; fixes double free mess
3250 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
3251 where no reply was received
3253 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
3256 * bus/signals.c (match_rule_matches): add special cases for the
3257 bus driver, so you can match on sender/destination for it.
3259 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
3260 DBUS_PRINT_BACKTRACE is set
3262 * dbus/dbus-internals.c: add pid to assertion failure messages
3264 * dbus/dbus-connection.c: add message type code to the debug spew
3266 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
3267 sender=foo not service=foo
3269 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
3270 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
3271 DBUS_ACTIVATION_ADDRESS instead
3273 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
3274 DBUS_SYSTEM_BUS_ADDRESS if appropriate
3276 * bus/bus.c (bus_context_new): handle OOM copying bus type into
3279 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
3280 (dbus_message_iter_get_object_path_array): new function (half
3281 finished, disabled for the moment)
3283 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
3284 DBUS_MESSAGE_TYPE_ERROR
3286 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
3287 avoid redirecting stderr to /dev/null
3288 (babysit): close stdin if not doing the "exit_with_session" thing
3290 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
3291 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
3292 stdout/stdin, so things don't get confused
3294 * bus/system.conf.in: fix to allow replies, I modified .conf
3295 instead of .conf.in again.
3297 2003-10-14 David Zeuthen <david@fubar.dk>
3299 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
3300 argtype to arg_type when raising unknown arg type exception.
3301 Changed type list to reflect the changes in dbus-protocol.h so
3302 the bindings actually work.
3304 2003-10-14 Havoc Pennington <hp@redhat.com>
3306 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
3307 to have a bug keeping it from outputting the .da files sometimes
3308 (string_get_string): don't append garbage nul bytes to the string.
3310 2003-10-15 Seth Nickell <seth@gnome.org>
3312 * python/Makefile.am:
3314 Include dbus_h_wrapper.h in the dist tarball.
3316 2003-10-14 Havoc Pennington <hp@redhat.com>
3318 * bus/bus.c (bus_context_check_security_policy): revamp this to
3319 work more sanely with new policy-based requested reply setup
3321 * bus/connection.c (bus_transaction_send_from_driver): set bus
3322 driver messages as no reply
3324 * bus/policy.c (bus_client_policy_check_can_receive): handle a
3325 requested_reply attribute on allow/deny rules
3327 * bus/system.conf: add <allow requested_reply="true"/>
3329 * bus/driver.c (bus_driver_handle_message): fix check for replies
3330 sent to the bus driver, which was backward. How did this ever work
3331 at all though? I think I'm missing something.
3333 * dbus/dbus-message.c (decode_header_data): require error and
3334 method return messages to have a reply serial field to be valid
3335 (_dbus_message_loader_queue_messages): break up this function;
3336 validate that reply serial and plain serial are nonzero;
3337 clean up the OOM/error handling.
3338 (get_uint_field): don't return -1 from this
3339 (dbus_message_create_header): fix signed/unsigned bug
3341 * bus/connection.c (bus_connections_expect_reply): save serial of
3342 the incoming message, not reply serial
3344 2003-10-14 Havoc Pennington <hp@redhat.com>
3346 * bus/connection.c: implement pending reply tracking using
3349 * bus/bus.c (bus_context_check_security_policy): verify that a
3350 reply is pending in order to allow a reply to be sent. Deny
3351 messages of unknown type.
3353 * bus/dbus-daemon-1.1.in: update to mention new resource limits
3355 * bus/bus.c (bus_context_get_max_replies_per_connection): new
3356 (bus_context_get_reply_timeout): new
3358 2003-10-13 Seth Nickell <seth@gnome.org>
3360 * python/Makefile.am:
3362 Pass "make distcheck": remove a couple files from DIST_FILES
3363 that weren't included in the final version.
3365 2003-10-12 Havoc Pennington <hp@pobox.com>
3367 Added test code that 1) starts an actual bus daemon and 2) uses
3368 DBusGProxy; fixed bugs that were revealed by the test. Lots
3369 more testing possible, but this is the basic framework.
3371 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
3372 empty proxy lists from the proxy list hash
3374 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
3375 couple of return_if_fail checks
3377 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
3378 to allocate, so everything is cleared to NULL as it should be.
3380 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
3381 source as data to dbus_connection_set_timeout_functions() as the
3382 timeout functions expected
3384 * test/glib/run-test.sh: add a little script to start up a message
3385 bus and run tests using it
3387 * tools/dbus-launch.1: updates
3389 * tools/dbus-launch.c (main): add --config-file option
3391 * tools/dbus-launch.c (main): remove confusing else if (runprog)
3392 that could never be reached.
3394 * dbus/dbus-message.c (dbus_message_new_method_return)
3395 (dbus_message_new_error, dbus_message_new_signal): set the
3396 no-reply-expected flag on all these. Redundant, but may
3397 as well be consistent.
3399 2003-10-11 Havoc Pennington <hp@pobox.com>
3401 * test/decode-gcov.c (function_solve_graph): make broken block
3402 graph a nonfatal error since it seems to be broken. Need to debug
3405 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
3406 can't just check type > INVALID < LAST anymore
3408 * dbus/dbus-message.c (dbus_message_get_signature): new function
3409 (dbus_message_has_signature): new function
3410 (struct DBusMessage): add signature field (right now it isn't sent
3411 over the wire, just generated on the fly)
3412 (dbus_message_copy): copy the signature, and init strings to
3413 proper length to avoid some reallocs
3414 (dbus_message_iter_init_array_iterator): return void, since it
3416 (dbus_message_iter_init_dict_iterator): return void since it can't fail
3417 (_dbus_message_loader_queue_messages): add silly temporary hack to
3418 fill in message->signature on load
3420 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
3421 characters, so they are relatively human-readable.
3423 2003-10-11 Havoc Pennington <hp@pobox.com>
3425 * dbus/dbus-message.c (_dbus_message_test): add more test
3426 coverage, but #if 0 for now since they uncover a bug
3427 not fixed yet; I think in re_align_field_recurse()
3428 (re_align_field_recurse): add FIXME about broken assertion
3430 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
3432 * bus/connection.c: share a couple code bits with expirelist.c
3434 * bus/expirelist.h, bus/expirelist.c: implement a generic
3435 expire-items-after-N-seconds facility, was going to share between
3436 expiring connections and replies, decided not to use for expiring
3437 connections for now.
3439 * COPYING: include AFL 2.0 (still need to change all the file headers)
3441 2003-10-09 Havoc Pennington <hp@redhat.com>
3443 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
3444 gcc 3.3. Not that we do anything about it yet.
3446 * bus/signals.c (bus_match_rule_parse): impose max length on the
3449 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
3451 2003-10-09 Havoc Pennington <hp@redhat.com>
3453 Make matching rules theoretically work (add parser).
3455 * bus/bus.c (bus_context_check_security_policy): fix up to handle
3456 the case where destination is explicitly specified as bus driver
3457 and someone else is eavesdropping.
3459 * bus/policy.c (bus_client_policy_check_can_receive): fix up
3460 definition of eavesdropping and assertion
3462 * tools/dbus-send.c (main): use dbus_message_type_from_string
3464 * bus/signals.c (bus_match_rule_parse): implement
3466 * dbus/dbus-message.c (dbus_message_type_from_string): new
3468 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
3470 2003-10-02 Havoc Pennington <hp@pobox.com>
3472 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
3473 dbus_gproxy_oneway_call
3475 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
3476 (dbus_server_setup_with_g_main): fix to allow calling them more
3477 than once on the same args
3478 (dbus_bus_get_with_g_main): new function
3480 2003-10-02 Havoc Pennington <hp@redhat.com>
3482 * doc/dbus-tutorial.xml: write some stuff
3484 2003-09-29 Havoc Pennington <hp@pobox.com>
3486 * configure.in: split checks for Doxygen from XML docs, check for
3489 * doc/Makefile.am: XML-ify all the docs, and add a blank
3492 2003-09-29 Havoc Pennington <hp@pobox.com>
3494 * Merge dbus-object-names branch. To see the entire patch
3495 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
3496 it's huuuuge though.
3497 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
3499 2003-09-28 Havoc Pennington <hp@pobox.com>
3501 * HACKING: update to reflect new server
3503 2003-09-26 Seth Nickell <seth@gnome.org>
3506 * python/examples/example-signals.py:
3508 Start implementing some notions of signals. The API
3509 is really terrible, but they sort of work (with the
3510 exception of being able to filter by service, and to
3511 transmit signals *as* a particular service). Need to
3512 figure out how to make messages come from the service
3515 * python/dbus_bindings.pyx.in:
3517 Removed duplicate message_handler callbacks.
3519 2003-09-25 Havoc Pennington <hp@redhat.com>
3521 * bus/session.conf.in: fix my mess
3523 2003-09-25 Havoc Pennington <hp@pobox.com>
3525 * bus/session.conf.in: fix security policy, reported by Seth Nickell
3527 2003-09-25 Seth Nickell <seth@gnome.org>
3529 * python/examples/example-service.py:
3531 Johan notices complete wrong code in example-service, but
3532 completely wrong in a way that works exactly the same (!).
3533 Johan is confused, how could this possibly work? Example
3534 code fails to serve purpose of making things clear.
3537 2003-09-25 Mark McLoughlin <mark@skynet.ie>
3539 * doc/dbus-specification.sgml: don't require header fields
3540 to be 4-byte aligned and specify that fields should be
3541 distinguished from padding by the fact that zero is not
3544 * doc/TODO: remove re-alignment item and add item to doc
3545 the OBJECT_PATH type.
3547 * dbus/dbus-message.c:
3548 (HeaderField): rename the original member to value_offset
3549 and introduce a name_offset member to keep track of where
3550 the field actually begins.
3551 (adjust_field_offsets): remove.
3552 (append_int_field), (append_uint_field),
3553 (append_string_field): don't align the start of the header
3554 field to a 4-byte boundary.
3555 (get_next_field): impl finding the next marhsalled field
3556 after a given field.
3557 (re_align_field_recurse): impl re-aligning a number of
3558 already marshalled fields.
3559 (delete_field): impl deleting a field of any type and
3560 re-aligning any following fields.
3561 (delete_int_or_uint_field), (delete_string_field): remove.
3562 (set_int_field), (set_uint_field): no need to re-check
3563 that we have the correct type for the field.
3564 (set_string_field): ditto and impl re-aligning any
3566 (decode_header_data): update to take into account that
3567 the fields aren't 4-byte aligned any more and the new
3568 way to distinguish padding from header fields. Also,
3569 don't exit when there is too much header padding.
3570 (process_test_subdir): print the directory.
3571 (_dbus_message_test): add test to make sure a following
3572 field is re-aligned correctly after field deletion.
3574 * dbus/dbus-string.[ch]:
3575 (_dbus_string_insert_bytes): rename from insert_byte and
3576 allow the insert of multiple bytes.
3577 (_dbus_string_test): test inserting multiple bytes.
3579 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
3580 warning note to docs about having to re-align any
3581 marshalled values following the string.
3583 * dbus/dbus-message-builder.c:
3584 (append_string_field), (_dbus_message_data_load):
3585 don't align the header field.
3587 * dbus/dbus-auth.c: (process_test_subdir): print the
3590 * test/break-loader.c: (randomly_add_one_byte): upd. for
3593 * test/data/invalid-messages/bad-header-field-alignment.message:
3596 * test/data/valid-messages/unknown-header-field.message: shove
3597 a dict in the unknown field.
3599 2003-09-25 Seth Nickell <seth@gnome.org>
3602 * python/dbus_bindings.pyx.in:
3604 Handle return values.
3606 * python/examples/example-client.py:
3607 * python/examples/example-service.py:
3609 Pass back return values from the service to the client.
3611 2003-09-24 Seth Nickell <seth@gnome.org>
3615 Connect Object methods (when you are sharing an object) up... pass
3616 in a list of methods to be shared. Sharing all the methods just
3617 worked out too weird. You can now create nice Services over the
3620 * python/dbus_bindings.pyx.in:
3622 Keep references to user_data tuples passed into C functions so
3623 Python doesn't garbage collect on us.
3625 Implement MethodReturn and Error subclasses of Message for creating
3626 DBusMessage's of those types.
3628 * python/examples/example-client.py:
3629 * python/examples/example-service.py:
3631 Simple example code showing both how create DBus services and objects,
3632 and how to use them.
3634 2003-09-23 Havoc Pennington <hp@pobox.com>
3636 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
3638 2003-09-23 Havoc Pennington <hp@redhat.com>
3640 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
3641 (dbus_gproxy_disconnect_signal): implement
3642 (dbus_gproxy_manager_remove_signal_match): implement
3643 (dbus_gproxy_manager_add_signal_match): implement
3644 (dbus_gproxy_oneway_call): implement
3646 2003-09-23 Havoc Pennington <hp@pobox.com>
3648 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
3649 subclass. This means dropping the transparent thread safety of the
3650 proxy; you now need a separate proxy per-thread, or your own
3651 locking on the proxy. Probably right anyway.
3652 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
3654 2003-09-22 Havoc Pennington <hp@redhat.com>
3656 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
3658 2003-09-21 Seth Nickell <seth@gnome.org>
3660 First checkin of the Python bindings.
3662 * python/.cvsignore:
3663 * python/Makefile.am:
3664 * python/dbus_bindings.pyx.in:
3665 * python/dbus_h_wrapper.h:
3667 Pieces for Pyrex to operate on, building a dbus_bindings.so
3668 python module for low-level access to the DBus APIs.
3672 High-level Python module for accessing DBus objects.
3677 Build stuff for the python bindings.
3681 Extra macro needed for finding the Python C header files.
3683 2003-09-21 Havoc Pennington <hp@pobox.com>
3685 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
3686 implementing the proxy manager, didn't get very far.
3688 * dbus/dbus-bus.c (dbus_bus_add_match): new
3689 (dbus_bus_remove_match): new
3691 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
3692 path_name argument; adjust the other not-yet-implemented
3693 gproxy constructors to be what I think they should be.
3695 2003-09-21 Havoc Pennington <hp@pobox.com>
3697 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
3698 by default for message bus connections.
3700 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
3701 exit_on_disconnect flag is set and we process the disconnected
3703 (dbus_connection_set_exit_on_disconnect): new function
3705 2003-09-21 Havoc Pennington <hp@pobox.com>
3707 Get matching rules mostly working in the bus; only actually
3708 parsing the rule text remains. However, the client side of
3709 "signal connections" hasn't been started, this patch is only the
3712 * dbus/dispatch.c: fix for the matching rules changes
3714 * bus/driver.c (bus_driver_handle_remove_match)
3715 (bus_driver_handle_add_match): send an ack reply from these
3718 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
3719 arguments, reported by Seth Nickell
3721 * bus/config-parser.c (append_rule_from_element): support
3722 eavesdrop=true|false attribute on policies so match rules
3723 can be prevented from snooping on the system bus.
3725 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
3726 and "destination" in attribute names; fix some docs bugs;
3727 add eavesdrop=true|false attribute
3729 * bus/driver.c (bus_driver_handle_add_match)
3730 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
3733 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
3734 rid of broadcast service concept, signals are just always broadcast
3736 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
3737 mostly implement matching rules stuff (currently only exposed as signal
3740 2003-09-21 Mark McLoughlin <mark@skynet.ie>
3742 * doc/dbus-specification.sgml: Change the header field name
3743 to be an enum and update the rest of the spec to reference
3744 the fields using the conventinal name.
3746 * dbus/dbus-protocol.h: update to reflect the spec.
3748 * doc/TODO: add item to remove the 4 byte alignment requirement.
3750 * dbus/dbus-message.c: Remove the code to generalise the
3751 header/body length and serial number header fields as named
3752 header fields so we can reference field names using the
3754 (append_int_field), (append_uint_field), (append_string_field):
3755 Append the field name as a byte rather than four chars.
3756 (delete_int_or_uint_field), (delete_string_field): reflect the
3757 fact that the field name and typecode now occupy 4 bytes instead
3759 (decode_string_field), (decode_header_data): update to reflect
3760 protocol changes and move the field specific encoding from
3761 decode_string_field() back into decode_header_data().
3763 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
3764 Add utility to aid debugging.
3766 * dbus/dbus-message-builder.c:
3767 (append_string_field), (_dbus_message_data_load): Update to
3768 reflect protocol changes; Change the FIELD_NAME directive
3769 to HEADER_FIELD and allow it to take the field's conventional
3770 name rather than the actual value.
3772 * test/data/*/*.message: Update to use HEADER_FIELD instead
3773 of FIELD_NAME; Always align the header on an 8 byte boundary
3774 *before* updating the header length.
3776 2003-09-15 Havoc Pennington <hp@pobox.com>
3778 * dbus/dbus-pending-call.c: add the get/set object data
3779 boilerplate as for DBusConnection, etc. Use generic object data
3780 for the notify callback.
3782 * glib/dbus-gparser.c (parse_node): parse child nodes
3784 * tools/dbus-viewer.c: more hacking on the dbus-viewer
3786 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
3787 contain functions shared between the convenience lib and the
3790 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
3791 -export-symbols-regex to the GLib library
3793 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
3794 fix the locking in here, and add a default handler for
3795 Introspect() that just returns sub-nodes.
3797 2003-09-14 Havoc Pennington <hp@pobox.com>
3799 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
3800 rather than gfoo consistent
3802 * glib/dbus-gproxy.h: delete for now, move contents to
3803 dbus-glib.h, because the include files don't work right since we
3804 aren't in the dbus/ subdir.
3806 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
3807 (dbus_gproxy_end_call): finish
3808 (dbus_gproxy_begin_call): finish
3810 * glib/dbus-gmain.c (dbus_set_g_error): new
3812 * glib/dbus-gobject.c (handle_introspect): include information
3813 about child nodes in the introspection
3815 * dbus/dbus-connection.c (dbus_connection_list_registered): new
3816 function to help in implementation of introspection
3818 * dbus/dbus-object-tree.c
3819 (_dbus_object_tree_list_registered_and_unlock): new function
3821 2003-09-12 Havoc Pennington <hp@pobox.com>
3823 * glib/dbus-gidl.h: add common base class for all the foo_info
3826 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
3829 * test/Makefile.am: try test srcdir -ef . in addition to test
3830 srcdir = ., one of them should work (yeah lame)
3832 * glib/Makefile.am: build the "idl" parser stuff as a convenience
3835 * glib/dbus-gparser.h: make description_load routines return
3836 NodeInfo* not Parser*
3838 * Makefile.am (SUBDIRS): build test dir after all library dirs
3840 * configure.in: add GTK+ detection
3842 2003-09-07 Havoc Pennington <hp@pobox.com>
3844 * Make Doxygen contented.
3846 2003-09-07 Havoc Pennington <hp@pobox.com>
3848 * doc/dbus-specification.sgml: more updates
3850 2003-09-06 Havoc Pennington <hp@pobox.com>
3852 * doc/dbus-specification.sgml: partial updates
3854 * bus/dbus-daemon-1.1.in: fix the config file docs for the
3855 zillionth time; hopefully I edited the right file this time.
3857 * bus/config-parser.c (append_rule_from_element): support
3858 send_type, send_path, receive_type, receive_path
3860 * bus/policy.c: add message type and path to the list of things
3861 that can be "firewalled"
3863 2003-09-06 Havoc Pennington <hp@pobox.com>
3865 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
3866 (dbus_connection_register_object_path): make this not handle
3867 messages to paths below the given path
3869 2003-09-03 Havoc Pennington <hp@pobox.com>
3871 * test/glib/Makefile.am: add this with random glib-linked test
3874 * glib/Makefile.am: remove the random test programs from here,
3875 leave only the unit tests
3877 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
3878 uscore/javacaps conversion, and fix
3879 (get_object_property, set_object_property): change to .NET
3880 convention for mapping props to methods, set_FooBar/get_FooBar,
3881 since one language has such a convention we may as well copy it.
3882 Plus real methods in either getFooBar or get_foo_bar style won't
3883 collide with this convention.
3885 2003-09-01 Havoc Pennington <hp@pobox.com>
3887 * glib/dbus-gparser.c: implement
3889 * glib/dbus-gobject.c: start implementing skeletons support
3891 * configure.in: when disabling checks/assert, also define
3892 G_DISABLE_ASSERT and G_DISABLE_CHECKS
3894 2003-09-01 Havoc Pennington <hp@pobox.com>
3896 * glib/Makefile.am: rearrange a bunch of files and get "make
3897 check" framework set up
3899 2003-08-31 Havoc Pennington <hp@pobox.com>
3901 * fix build with --disable-tests
3903 2003-08-30 Havoc Pennington <hp@pobox.com>
3905 * dbus/dbus-connection.c: purge DBusMessageHandler
3907 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
3908 use callbacks everywhere
3910 2003-08-30 Havoc Pennington <hp@pobox.com>
3912 * test/data/valid-config-files/system.d/test.conf: change to
3913 root for the user so warnings don't get printed
3915 * dbus/dbus-message.c: add dbus_message_get_path,
3916 dbus_message_set_path
3918 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
3919 dispatching to a path
3921 * dbus/dbus-string.c (_dbus_string_validate_path): add
3923 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
3924 (_dbus_marshal_object_path): implement
3926 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
3927 to contain the path to the target object
3928 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
3929 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
3931 2003-08-30 Havoc Pennington <hp@pobox.com>
3933 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
3935 2003-08-29 Havoc Pennington <hp@pobox.com>
3937 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
3939 (struct DBusObjectSubtree): shrink this
3940 a lot, since we may have a lot of them
3941 (_dbus_object_tree_free_all_unlocked): implement
3942 (_dbus_object_tree_dispatch_and_unlock): implement
3944 2003-08-29 Havoc Pennington <hp@pobox.com>
3946 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
3948 2003-08-28 Havoc Pennington <hp@pobox.com>
3952 * dbus/dbus-connection.c: port to no ObjectID, create a
3953 DBusObjectTree, rename ObjectTree to ObjectPath in public API
3955 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
3956 everything except UnregisterFunction and MessageFunction
3958 * dbus/dbus-marshal.c: port away from DBusObjectID,
3959 add DBUS_TYPE_OBJECT_PATH
3961 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
3962 dbus/dbus-objectid.[hc]: remove these, we are moving to
3963 path-based object IDs
3965 2003-08-25 Havoc Pennington <hp@pobox.com>
3967 Just noticed that dbus_message_test is hosed, I wonder when I
3968 broke that. I thought make check was passing earlier...
3970 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
3971 container tree, will replace most of dbus-object-registry
3973 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
3976 2003-08-19 Havoc Pennington <hp@pobox.com>
3978 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
3979 (dbus_message_is_error): fix this function
3981 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
3984 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
3985 reflect clarified man page
3986 (bus_client_policy_check_can_send): ditto
3988 * bus/session.conf.in: fixup
3990 * bus/system.conf.in: fixup
3992 2003-08-18 Havoc Pennington <hp@redhat.com>
3994 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
3996 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3997 dumb bug created earlier (wrong order of args to
3998 decode_header_data())
4000 * tools/dbus-send.c: port
4002 * tools/dbus-print-message.c (print_message): port
4004 * test/data/*messages: port all messages over
4006 * dbus/dbus-message-builder.c: support including
4009 * bus/driver.c: port over
4011 * bus/dispatch.c: port over to new stuff
4013 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4014 rename disconnect signal to "Disconnected"
4016 2003-08-17 Havoc Pennington <hp@pobox.com>
4018 This doesn't compile yet, but syncing up so I can hack on it from
4019 work. What are branches for if not broken code? ;-)
4021 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
4022 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
4023 DBUS_HEADER_FIELD_ERROR_NAME
4025 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
4026 for the interface+member pairs
4027 (string_hash): change to use g_str_hash algorithm
4028 (find_direct_function, find_string_function): refactor these to
4031 * dbus/dbus-message.c: port all of this over to support
4032 interface/member fields instead of name field
4034 * dbus/dbus-object-registry.c: port over
4036 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
4037 from _dbus_string_validate_name
4039 * bus/dbus-daemon-1.1: change file format for the
4040 <deny>/<allow> stuff to match new message naming scheme
4042 * bus/policy.c: port over
4044 * bus/config-parser.c: parse new format
4046 2003-08-16 Havoc Pennington <hp@pobox.com>
4048 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
4051 * glib/dbus-gproxy.c: some hacking
4053 2003-08-15 Havoc Pennington <hp@redhat.com>
4055 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
4057 * dbus/dbus-connection.c
4058 (dbus_connection_send_with_reply_and_block): factor out internals;
4059 change to convert any error replies to DBusError instead of
4060 returning them as a message
4062 2003-08-15 Havoc Pennington <hp@pobox.com>
4064 * dbus/dbus-connection.c,
4065 dbus/dbus-pending-call.c: Finish the pending call stuff
4067 2003-08-14 Havoc Pennington <hp@redhat.com>
4069 * dbus/dbus-pending-call.c: start on new object that will replace
4070 DBusMessageHandler and ReplyHandlerData for tracking outstanding
4073 * dbus/dbus-gproxy.c: start on proxy object used to communicate
4074 with remote interfaces
4076 * dbus/dbus-gidl.c: do the boring boilerplate in here
4078 2003-08-12 Havoc Pennington <hp@pobox.com>
4080 * bus/dispatch.c (bus_dispatch): make this return proper
4081 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
4083 * dbus/dbus-errors.c (dbus_set_error): use
4084 _dbus_string_append_printf_valist
4086 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
4087 (_dbus_string_append_printf): new
4089 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
4092 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
4093 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
4094 message is unhandled.
4096 2003-08-11 Havoc Pennington <hp@pobox.com>
4098 * bus/test.c (client_disconnect_handler): change to return
4099 HANDLED (would have been REMOVE_MESSAGE)
4101 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
4102 HANDLED/NOT_YET_HANDLED instead of
4103 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
4106 2003-08-10 Havoc Pennington <hp@pobox.com>
4108 * tools/dbus-send.c (main): add --type argument, for now
4109 supporting only method_call and signal types.
4111 * tools/dbus-print-message.c: print message type
4113 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4114 init connection->objects
4116 * doc/dbus-specification.sgml: fix sgml
4118 * bus/*.c: port over to object-instance API changes
4120 * test/test-service.c: ditto
4122 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
4123 name, we will have to fix up the rest of the code to also handle
4125 (dbus_message_new): generic message-creation call
4126 (set_string_field): allow appending name field
4128 2003-08-06 Havoc Pennington <hp@pobox.com>
4130 * dbus/dbus-object-registry.c: implement signal connection
4133 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
4135 * dbus/dbus-internals.c (_dbus_memdup): new function
4137 2003-08-02 Havoc Pennington <hp@pobox.com>
4139 * dbus/dbus-message.c (dbus_message_get_no_reply)
4140 (dbus_message_set_no_reply): add these and remove
4141 set_is_error/get_is_error
4143 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
4144 remove the ERROR flag, since there's now an ERROR type
4146 2003-08-01 Havoc Pennington <hp@pobox.com>
4148 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
4151 * dbus/dbus-message.c (dbus_message_get_type): new function
4153 * doc/dbus-specification.sgml: add "type" byte to messages
4155 2003-08-01 Havoc Pennington <hp@pobox.com>
4157 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
4158 a message type enum to distinguish kinds of message
4159 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
4160 that need not be replied to
4162 2003-08-01 Havoc Pennington <hp@pobox.com>
4164 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
4165 (unpack_8_octets): fix no-64-bit-int bug
4167 * dbus/dbus-object-registry.c (validate_id): validate the
4168 connection ID bits, not just the instance ID.
4170 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
4171 the connection-global 33 bits of the object ID
4173 * dbus/dbus-object-registry.c (info_from_entry): fill in
4174 object ID in the new way
4176 * dbus/dbus-objectid.h: rather than high/low bits, specifically
4177 define server/client/instance bits.
4179 2003-07-30 Havoc Pennington <hp@pobox.com>
4181 * dbus/dbus-connection.c (dbus_connection_register_object): fix
4184 2003-07-13 Havoc Pennington <hp@pobox.com>
4186 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
4187 fields to DBusObjectVTable and DBusObjectInfo
4189 2003-07-12 Havoc Pennington <hp@pobox.com>
4191 * dbus/dbus-object-registry.c: implement unit test,
4192 fix bugs discovered in process
4194 * dbus/dbus-connection.c: remove handler_table and
4195 register_handler(), add DBusObjectRegistry usage
4197 * dbus/dbus-objectid.c (dbus_object_id_is_null)
4198 (dbus_object_id_set_null): new functions
4200 2003-07-08 Havoc Pennington <hp@pobox.com>
4202 * dbus/dbus-object.c: implement some of this
4204 * dbus/dbus-object-registry.c
4205 (_dbus_object_registry_add_and_unlock): fill in the object_id out
4207 (_dbus_object_registry_new): handle OOM
4209 2003-07-08 Havoc Pennington <hp@pobox.com>
4211 * dbus/dbus-object.h: sketch out an API for registering objects
4212 with a connection, that allows us to use as little as 24 bytes
4213 per object and lets application code represent an object in
4214 any conceivable way.
4216 * dbus/dbus-object-registry.c: implement the hard bits of the
4217 DBusConnection aspect of object API. Not yet wired up.
4219 2003-07-06 Havoc Pennington <hp@pobox.com>
4221 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
4222 (_dbus_marshal_object_id): new
4223 (_dbus_demarshal_object_id): new
4224 (_dbus_marshal_get_arg_end_pos): support object ID type, and
4225 consolidate identical switch cases. Don't conditionalize handling
4226 of DBUS_TYPE_UINT64, need to handle the type always.
4227 (_dbus_marshal_validate_arg): consolidate identical cases, and
4228 handle DBUS_TYPE_OBJECT_ID
4230 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
4232 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
4234 2003-09-28 Havoc Pennington <hp@pobox.com>
4238 2003-09-28 Havoc Pennington <hp@pobox.com>
4240 * doc/Makefile.am (dbus-specification.html): testing a funky hack
4241 to work with Debian db2html
4243 2003-09-28 Havoc Pennington <hp@pobox.com>
4245 * configure.in: 0.13
4247 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
4248 stylesheet-images for benefit of Debian
4250 Change back to using filesystem-linked sockets for the system
4251 bus, so only root can create the default system bus address.
4253 * bus/system.conf.in: change to use
4254 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4256 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
4259 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4260 here, and AC_DEFINE DBUS_SYSTEM_PATH
4262 2003-08-09 Anders Carlsson <andersca@codefactory.se>
4265 * doc/busconfig.dtd:
4268 2003-08-09 Anders Carlsson <andersca@codefactory.se>
4270 * doc/dbus-specification.sgml:
4271 Add activation reply values.
4273 2003-08-05 Havoc Pennington <hp@redhat.com>
4275 * configure.in: 0.12
4277 2003-08-05 Anders Carlsson <andersca@codefactory.se>
4279 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
4280 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
4281 (add_watch), (remove_watch), (create_source):
4282 Refcount fds, fixes some reentrancy issues.
4284 2003-07-30 Havoc Pennington <hp@redhat.com>
4286 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
4287 bus address to be abstract if we have abstract sockets
4291 2003-07-28 Havoc Pennington <hp@redhat.com>
4293 * bus/messagebus.in: fix to avoid processname/servicename
4294 confusion, from Michael Kearey
4295 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
4297 2003-07-23 Havoc Pennington <hp@pobox.com>
4299 * dbus/dbus-message.c (dbus_message_iter_get_named):
4300 fix from Andy Hanton to remove broken "+1"
4302 2003-07-16 Havoc Pennington <hp@pobox.com>
4304 * tools/dbus-launch.c (babysit): close stdout/stderr in the
4305 babysitter process, as suggested by Thomas Leonard, so
4306 an "eval `dbus-launch --exit-with-session`" will actually
4309 2003-07-16 Havoc Pennington <hp@pobox.com>
4311 * configure.in: print out EXPANDED_* variables in the summary at
4312 the end; clean up the code that computes EXPANDED_ variables and
4313 get the ones using exec_prefix right. Should make things work
4314 when you build without --prefix
4316 2003-06-29 Havoc Pennington <hp@pobox.com>
4318 * mono/Test.cs (class Test): fire up a main loop and run it
4320 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
4321 done once, the app has to do it
4323 2003-06-26 Havoc Pennington <hp@pobox.com>
4325 * mono/Connection.cs: set up connection with the glib main loop
4327 2003-07-01 Havoc Pennington <hp@redhat.com>
4329 * doc/dbus-specification.sgml: clarify the format of a type code,
4330 change suggested by Jim Blandy
4332 2003-06-29 Miloslav Trmac <mitr@volny.cz>
4335 * tools/Makefile.am: Don't assume srcdir == builddir.
4337 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
4338 the allocated block.
4339 (_dbus_memory_test): New function.
4340 * dbus/dbus-test.h: Add _dbus_memory_test ().
4341 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
4343 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
4345 (dbus_message_new): Remove obsolete @todo.
4347 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
4348 (_dbus_marshal_set_uint64): Fix comment.
4350 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
4351 hardcode FIELD_REPLY_SERIAL.
4353 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
4354 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
4356 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
4357 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
4359 2003-06-24 Havoc Pennington <hp@pobox.com>
4361 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
4363 2003-06-23 Anders Carlsson <andersca@codefactory.se>
4369 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
4370 * gcj/org/.cvsignore:
4371 * gcj/org/Makefile.am:
4372 * gcj/org/freedesktop/.cvsignore:
4373 * gcj/org/freedesktop/Makefile.am:
4374 * gcj/org/freedesktop/dbus/.cvsignore:
4375 * gcj/org/freedesktop/dbus/Makefile.am:
4376 * gcj/org/freedesktop/dbus/Message.java: (Message),
4378 * gcj/org/freedesktop/dbus/natMessage.cc:
4379 Fix the build system.
4381 2003-06-22 Havoc Pennington <hp@pobox.com>
4383 * mono/Connection.cs: add more bindings
4385 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
4388 2003-06-22 Havoc Pennington <hp@pobox.com>
4390 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
4391 Start wrapping more stuff.
4393 2003-06-22 Havoc Pennington <hp@pobox.com>
4395 * mono/Message.cs: implement Message.Wrap() that ensures we only
4396 have a single C# wrapper per DBusMessage, assuming it works which
4397 it probably doesn't.
4399 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
4400 (dbus_message_free_data_slot): new
4401 (dbus_message_set_data): new
4402 (dbus_message_get_data): new
4404 2003-06-22 Havoc Pennington <hp@pobox.com>
4406 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
4407 (_dbus_data_slot_allocator_alloc): rework these to keep a
4408 reference count on each slot and automatically manage a global
4409 slot ID variable passed in by address
4411 * bus/bus.c: convert to new dataslot API
4413 * dbus/dbus-bus.c: convert to new dataslot API
4415 * dbus/dbus-connection.c: convert to new dataslot API
4417 * dbus/dbus-server.c: convert to new dataslot API
4419 * glib/dbus-gmain.c: ditto
4423 * bus/connection.c: ditto
4425 2003-06-22 Anders Carlsson <andersca@codefactory.se>
4427 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
4428 after the gcj checks so that the correct configuration tags
4429 will be added to libtool.
4431 * dbus-glib-1.pc.in: No need to specify any includes since
4432 dbus-1.pc.in has those.
4434 2003-06-22 Havoc Pennington <hp@pobox.com>
4436 * mono/*, gcj/*, configure.in, Makefile.am:
4437 Check in makefiles and subdirs for mono and gcj bindings.
4438 Neither binding actually exists, just trying to get through
4439 all the build and other boring bits.
4441 2003-06-21 Philip Blundell <philb@gnu.org>
4443 * tools/dbus-monitor.1: Updated.
4445 * tools/dbus-send.1: Likewise.
4447 2003-06-20 Anders Carlsson <andersca@codefactory.se>
4449 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
4450 for hangup and error after checking read so we won't discard
4451 pending data if both hangup and read are set.
4453 2003-06-19 Philip Blundell <philb@gnu.org>
4455 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
4457 * tools/dbus-send.c: Accept both --system and --session.
4459 * tools/dbus-monitor.c: Same here.
4461 2003-06-19 Anders Carlsson <andersca@codefactory.se>
4463 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
4464 from C++ (Patch by Miloslav Trmac).
4466 2003-06-15 Joe Shaw <joe@assbarn.com>
4468 * configure.in: Check for socklen_t.
4470 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
4472 * test/test-segfault.c: Add #include <sys/time.h>
4474 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
4475 dbus-launch needs it.
4477 2003-06-09 Havoc Pennington <hp@redhat.com>
4479 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
4480 SUN_LEN, it breaks abstract socket usage
4482 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
4485 2003-06-04 Havoc Pennington <hp@pobox.com>
4487 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
4488 using unix:abstract=/foo, and when listening in a tmpdir
4489 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
4491 * dbus/dbus-transport.c (_dbus_transport_open): support
4494 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4495 support abstract sockets
4497 * dbus/dbus-transport-unix.c
4498 (_dbus_transport_new_for_domain_socket): support abstract sockets
4500 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
4501 toggle as an argument, implement abstract namespace support
4502 (_dbus_listen_unix_socket): ditto
4504 * configure.in: add --enable-abstract-sockets and implement
4505 a configure check for autodetection of the right value.
4507 2003-06-01 Havoc Pennington <hp@pobox.com>
4509 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
4510 in /tmp (though on Linux this will end up being useless,
4511 when we add abstract namespace support)
4513 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
4516 2003-05-28 Colin Walters <walters@verbum.org>
4518 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
4520 2003-05-18 Anders Carlsson <andersca@codefactory.se>
4522 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
4524 2003-05-17 Colin Walters <walters@gnu.org>
4526 * tools/dbus-send.c: Don't exit with an error code if --help was
4527 passed. Default to using the session bus instead of the system
4530 * tools/dbus-launch.c: Ditto.
4532 * tools/dbus-monitor.c: Ditto.
4534 * tools/dbus-send.1: Update with new arguments.
4536 * tools/dbus-launch.c: Emit code to export variables. New
4537 arguments -s and -c to specify shell syntax, and a bit of code to
4538 autodetect syntax. Also, allow specifying a program to run.
4540 * tools/dbus-launch.1: Update with new arguments.
4542 * tools/dbus-send.1: Ditto.
4544 * tools/dbus-monitor.1: Ditto.
4546 2003-05-17 Havoc Pennington <hp@pobox.com>
4548 * bus/config-parser.c (merge_included): merge in policies from
4549 child configuration file.
4551 * bus/policy.c (bus_policy_merge): function to merge two policies
4554 2003-05-16 Havoc Pennington <hp@redhat.com>
4556 * dbus/dbus-connection.c: disable verbose lock spew
4558 * tools/dbus-send.c: add --print-reply command line option
4560 * tools/dbus-print-message.h (print_message): new util function
4561 shared by dbus-send and dbus-monitor
4563 * tools/dbus-monitor.c (handler_func): exit on disconnect
4565 * dbus/dbus-transport-unix.c (do_reading): if the transport is
4566 disconnected, don't try to use the read_watch
4568 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
4569 so we can find this bug more easily
4571 2003-05-16 Havoc Pennington <hp@redhat.com>
4573 * bus/policy.c (free_rule_list_func): avoid a crash when passed
4574 NULL as DBusHashTable is annoyingly likely to do.
4576 2003-05-16 Colin Walters <walters@verbum.org>
4578 * tools/dbus-monitor.c: Add --session argument and usage()
4581 * tools/dbus-monitor.1: Update with new --session arg.
4583 * bus/Makefile.am (install-data-hook): Create
4584 $(libdir)/dbus-1.0/services so that the session bus is happy.
4586 2003-05-15 Havoc Pennington <hp@redhat.com>
4588 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
4589 on non-x86. ifdef's are evil.
4591 2003-05-15 Havoc Pennington <hp@redhat.com>
4593 * configure.in: 0.11
4597 * bus/Makefile.am (initddir): apparently we are supposed to put
4598 init scripts in /etc/rc.d/init.d not /etc/init.d
4600 * bus/Makefile.am: remove the "you must --enable-tests to make
4601 check" as it broke distcheck
4603 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
4605 2003-05-13 James Willcox <jwillcox@gnome.org>
4608 * bus/activation.c: (bus_activation_service_created),
4609 (bus_activation_activate_service):
4610 * bus/driver.c: (bus_driver_send_service_deleted),
4611 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4612 (bus_driver_send_service_acquired),
4613 (bus_driver_send_welcome_message),
4614 (bus_driver_handle_list_services):
4615 * bus/session.conf.in:
4616 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
4617 (dbus_bus_service_exists), (dbus_bus_activate_service):
4620 Add some convenience API which lets you activate a service, and did a
4621 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
4622 and dbus_message_get_args()
4624 2003-05-11 Havoc Pennington <hp@pobox.com>
4626 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
4627 calling _dbus_marshal_validate_arg() for every byte in a byte
4630 * dbus/dbus-message-handler.c: use atomic reference counting to
4631 reduce number of locks slightly; the global lock in here sucks
4633 * dbus/dbus-connection.c
4634 (_dbus_connection_update_dispatch_status_and_unlock): variant of
4635 update_dispatch_status that can be called with lock held; then use
4636 in a couple places to reduce locking/unlocking
4637 (dbus_connection_send): hold the lock over the whole function
4638 instead of acquiring it twice.
4640 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
4642 * bus/connection.c (bus_connections_setup_connection): fix access
4643 to already-freed memory.
4645 * dbus/dbus-connection.c: keep a little cache of linked list
4646 nodes, to avoid using the global linked list alloc lock in the
4647 normal send-message case. Instead we just use the connection lock
4648 that we already have to take.
4650 * dbus/dbus-list.c (_dbus_list_find_last): new function
4652 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
4653 change to use a struct for the atomic type; fix docs,
4654 they return value before increment, not after increment.
4656 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
4657 (_dbus_string_append_8_aligned): new functions to try to
4658 microoptimize this operation.
4659 (reallocate_for_length): break this out of set_length(), to
4660 improve profile info, and also so we can consider inlining the
4663 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
4664 strings with some preallocation, cuts down on our calls to realloc
4665 a fair bit. Though if we can get the "move entire string to empty
4666 string" optimization below to kick in here, it would be better.
4668 * dbus/dbus-string.c (_dbus_string_move): just call
4669 _dbus_string_move_len
4670 (_dbus_string_move_len): add a special case for moving
4671 an entire string into an empty string; we can just
4672 swap the string data instead of doing any reallocs.
4673 (_dbus_string_init_preallocated): new function
4675 2003-05-11 Havoc Pennington <hp@pobox.com>
4677 Write a "test-profile" that does echo client-server with threads;
4678 profile reveals lock contention, memcpy/realloc of buffers, and
4679 UTF-8 validation as hot spots. 20% of lock contention eliminated
4680 with dbus_atomic_inc/dec implementation on x86. Much remaining
4681 contention is global mempool locks for GList and DBusList.
4683 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
4686 * dbus/dbus-connection.c (struct DBusConnection): use
4687 dbus_atomic_t for the reference count
4689 * dbus/dbus-message.c (struct DBusMessage): declare
4690 dbus_atomic_t values as volatile
4692 * configure.in: code to detect ability to use atomic integer
4693 operations in assembly, from GLib patch
4695 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
4696 time, tired of it being wrong in threads and forked processes
4698 * glib/test-profile.c: a little program to bounce messages back
4699 and forth between threads and eat CPU
4701 * dbus/dbus-connection.c: add debug spew macros for debugging
4702 thread locks; include config.h at top; fix deadlock in
4703 dbus_connection_flush()
4705 2003-05-08 Havoc Pennington <hp@pobox.com>
4707 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
4708 data from getting written, and there wasn't a good reason to
4711 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
4712 dbus_verbose lines in test coverage
4713 (main): add list of functions sorted by # of untested blocks
4714 to the coverage report
4716 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
4718 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
4720 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
4721 extend test coverage
4723 * test/data/auth/cancel.auth-script: test canceling an
4726 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
4727 aren't used. in CVS history if we end up needing them.
4729 2003-05-04 Havoc Pennington <hp@pobox.com>
4731 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
4734 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
4735 function, which assumed length was in # of strings, not bytes
4737 * dbus/dbus-message.c (_dbus_message_test): add tests for some
4740 * dbus/dbus-connection.c
4741 (_dbus_connection_queue_received_message): disable function for
4742 now, we are only using it in test mode
4744 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4745 remove a mistaken FIXME
4747 2003-05-04 Havoc Pennington <hp@pobox.com>
4749 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
4750 unlock mutex on successful return, patch from Anders Gustafsson
4752 2003-05-04 Havoc Pennington <hp@pobox.com>
4754 * dbus-glib-1.pc.in (Requires): fix dependencies, from
4757 2003-05-04 Havoc Pennington <hp@pobox.com>
4759 * tools/dbus-launch.c: implement
4761 * bus/main.c (main), bus/bus.c (bus_context_new):
4762 implement --print-pid and --fork
4764 2003-05-03 Havoc Pennington <hp@redhat.com>
4766 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
4767 the address had no value, and add to test suite. Fix and
4768 regression test from Miloslav Trmac
4770 2003-05-03 Havoc Pennington <hp@pobox.com>
4772 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
4773 watch is invalid when handled
4775 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
4776 dbus-launch utility to launch the bus from a shell script. Didn't
4777 actually implement dbus-launch yet, it's just a placeholder still.
4779 2003-05-03 Havoc Pennington <hp@pobox.com>
4781 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
4782 daemon; also documents daemon config file, so replaces
4783 doc/config-file.txt. Corrected some stuff from config-file.txt in
4784 the process of moving it.
4786 2003-05-03 Havoc Pennington <hp@pobox.com>
4788 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
4791 2003-05-03 Colin Walters <walters@verbum.org>
4793 * dbus/dbus-sysdeps.c (fill_user_info): Test against
4794 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
4796 * Makefile.am: Update to use new .pc versioning scheme.
4798 2003-05-02 Havoc Pennington <hp@redhat.com>
4800 * bus/system.conf.in: allow send/receive to/from message bus
4803 2003-04-30 Havoc Pennington <hp@redhat.com>
4805 * configure.in: print a note when building with unit tests and
4808 2003-04-30 Havoc Pennington <hp@redhat.com>
4810 * Makefile.am: add a check-local that complains if you didn't
4811 configure with --enable-tests
4813 2003-04-29 Havoc Pennington <hp@redhat.com>
4815 * glib/dbus-gmain.c: docs cleanups
4817 * dbus/dbus-types.h: add docs on int64 types
4819 * dbus/dbus-memory.c: fix docs to avoid putting private API in
4820 public API docs section
4822 2003-04-29 Havoc Pennington <hp@redhat.com>
4824 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
4825 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
4826 parallel install API version, not with the D-BUS package version.
4828 * HACKING: move some of README over here
4830 * README: updates, and document API/ABI policy
4832 * configure.in: reindentation
4834 2003-04-29 Havoc Pennington <hp@redhat.com>
4836 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
4837 to use this library" to be sure people have the right
4840 2003-04-28 Havoc Pennington <hp@redhat.com>
4842 * configure.in: add --enable-docs which by default is auto yes if
4843 doxygen and db2html found, no otherwise; but can be forced on/off
4845 * doc/Makefile.am: conditionalize whether to build docs on
4848 2003-04-28 Havoc Pennington <hp@redhat.com>
4850 * configure.in: 0.10
4854 * bus/system.conf.in: add <includedir>system.d</includedir>
4856 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
4857 username was provided but not uid
4859 * bus/config-parser.c (struct BusConfigParser): keep track of
4860 whether the parser is toplevel or was included; change some
4861 of the error handling if it's included.
4863 2003-04-27 Havoc Pennington <hp@pobox.com>
4867 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
4868 report correct status if we finish processing authentication
4869 inside this function.
4871 * bus/activation.c (try_send_activation_failure): use
4872 bus_transaction_send_error_reply
4874 * bus/connection.c (bus_connection_get_groups): return an error
4875 explaining the problem
4877 * bus/bus.c (bus_context_check_security_policy): implement
4878 restriction here that inactive connections can only send the
4879 hello message. Also, allow bus driver to send anything to
4882 * bus/connection.c (bus_connection_complete): create the
4883 BusClientPolicy here instead of on-demand.
4884 (bus_connection_get_policy): don't return an error
4886 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
4887 sender field in message being replied to
4889 * bus/bus.c (bus_context_check_security_policy): fix silly typo
4890 causing it to return FALSE always
4892 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
4893 we checked sender rather than destination
4895 2003-04-25 Havoc Pennington <hp@redhat.com>
4897 test suite is slightly hosed at the moment, will fix soon
4899 * bus/connection.c (bus_connections_expire_incomplete): fix to
4900 properly disable the timeout when required
4901 (bus_connection_set_name): check whether we can remove incomplete
4902 connections timeout after we complete each connection.
4904 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
4905 probably still broken.
4907 * bus/services.c (bus_registry_acquire_service): implement max
4908 number of services owned, and honor allow/deny rules on which
4909 services a connection can own.
4911 * bus/connection.c (bus_connection_get_policy): report errors here
4913 * bus/activation.c: implement limit on number of pending
4916 2003-04-25 Havoc Pennington <hp@redhat.com>
4918 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
4919 where we used >= 0 instead of != DBUS_UID_UNSET.
4921 2003-04-25 Havoc Pennington <hp@redhat.com>
4923 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
4924 were toggled without add/remove, fix from Anders Gustafsson
4926 2003-04-24 Havoc Pennington <hp@redhat.com>
4928 * test/data/valid-config-files/basic.conf: add <limit> tags to
4931 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
4932 <limit> tag in configuration file.
4934 2003-04-24 Havoc Pennington <hp@redhat.com>
4936 * bus/dispatch.c: somehow missed some name_is
4938 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
4939 (_dbus_timeout_set_interval): new
4941 * bus/connection.c (bus_connections_setup_connection): record time
4942 when each connection is first set up, and expire them after the
4943 auth timeout passes.
4945 2003-04-24 Havoc Pennington <hp@redhat.com>
4947 * dbus/dbus-message.c (dbus_message_name_is): rename
4948 (dbus_message_service_is): rename
4949 (dbus_message_sender_is): rename
4950 (dbus_message_get_service): rename
4952 2003-04-24 Havoc Pennington <hp@redhat.com>
4954 * configure.in: add --enable-checks
4956 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
4958 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
4959 to use thread locks.
4960 (_dbus_connection_handler_destroyed_locked): move some private
4961 functions into proper docs group
4963 * dbus/dbus-internals.h: add _dbus_return_if_fail,
4964 _dbus_return_val_if_fail
4966 Throughout: use dbus_return_if_fail
4968 2003-04-23 James Willcox <jwillcox@gnome.org>
4971 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
4972 (dbus_connection_setup_with_g_main),
4973 (dbus_server_setup_with_g_main):
4974 * glib/test-dbus-glib.c: (main):
4975 * glib/test-thread-client.c: (main):
4976 * glib/test-thread-server.c: (new_connection_callback), (main):
4977 * tools/dbus-monitor.c: (main):
4979 Added a GMainContext argument to dbus_connection_setup_with_g_main()
4980 and dbus_server_setup_with_g_main().
4982 2003-04-20 Havoc Pennington <hp@pobox.com>
4984 * doc/dbus-specification.sgml: document the restrictions on
4985 message and service names
4987 2003-04-22 Havoc Pennington <hp@redhat.com>
4989 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
4990 support, and do some code cleanups to share more code and
4991 speed up array marshal/demarshal.
4993 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
4995 * configure.in: generate dbus-arch-deps.h
4997 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
5000 2003-04-22 Havoc Pennington <hp@redhat.com>
5002 * test/data/valid-messages/opposite-endian.message: fix test
5003 to use proper type for rply field
5005 * test/data/invalid-messages: add tests for below validation
5007 * dbus/dbus-message.c (decode_header_data): validate field types,
5008 and validate that named fields are valid names
5009 (decode_name_field): consider messages in the
5010 org.freedesktop.Local. namespace to be invalid.
5012 * dbus/dbus-string.c (_dbus_string_validate_name): new
5014 2003-04-19 Havoc Pennington <hp@pobox.com>
5016 * bus/driver.c (bus_driver_handle_hello): check limits and
5017 return an error if they are exceeded.
5019 * bus/connection.c: maintain separate lists of active and inactive
5020 connections, and a count of each. Maintain count of completed
5021 connections per user. Implement code to check connection limits.
5023 * dbus/dbus-list.c (_dbus_list_unlink): export
5025 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
5026 number of bytes in the message queue for a connection
5028 2003-04-18 Havoc Pennington <hp@pobox.com>
5030 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
5032 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
5035 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
5036 on realloc be sure to update the pointer in the keyring
5038 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
5039 offset to avoid writing to unallocated memory
5041 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
5042 try the next mechanism, so we properly handle OOM
5044 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
5046 (_dbus_keyring_new): fix OOM bug
5047 (_dbus_keyring_new_homedir): always set error; impose a maximum
5048 number of keys we'll load from the file, mostly to speed up the
5049 test suite and make its OOM checks more useful, but also for
5052 * dbus/dbus-auth.c (process_error_server): reject authentication
5053 if we get an error from the client
5054 (process_cancel): on cancel, send REJECTED, per the spec
5055 (process_error_client): send CANCEL if we get an error from the
5058 2003-04-18 Havoc Pennington <hp@pobox.com>
5060 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
5063 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
5066 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
5067 about DBUS_TEST_HOMEDIR once
5069 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
5072 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
5073 config file so we test the right thing
5075 Throughout: assorted docs improvements
5077 2003-04-18 Havoc Pennington <hp@pobox.com>
5079 * glib/dbus-gmain.c: adapt to watch changes
5081 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
5083 * dbus/dbus-server.h: remove dbus_server_handle_watch
5085 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
5087 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
5088 like DBusTimeout, so we don't need dbus_connection_handle_watch
5091 2003-04-17 Havoc Pennington <hp@redhat.com>
5093 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
5094 database usage so it all goes via the DBusUserDatabase cache.
5096 2003-04-17 Havoc Pennington <hp@redhat.com>
5098 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
5099 there was an OOM watch we skipped, we always return TRUE so we
5100 iterate again to have a look at it again. Fixes test suite hang.
5101 Code rearrangement also lets us lose some memset and only iterate
5102 over callbacks once.
5104 * bus/driver.c (bus_driver_handle_message): sense of test for
5107 2003-04-16 Havoc Pennington <hp@pobox.com>
5109 * doc/dbus-specification.sgml: make spec say serials are unsigned
5111 * dbus/dbus-message.h: change message serials to unsigned
5113 * dbus/dbus-connection.c: adapt to message serials being unsigned
5115 2003-04-15 Havoc Pennington <hp@pobox.com>
5117 * bus/bus.c: create and keep around a shared DBusUserDatabase
5120 * bus/connection.c (bus_connection_get_groups): don't cache
5121 groups for user in the connection object, since user database
5122 object now does that.
5124 2003-04-16 Havoc Pennington <hp@redhat.com>
5126 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
5127 list of size counters
5128 (_dbus_message_loader_putback_message_link): put back a popped link
5130 * dbus/dbus-connection.c
5131 (dbus_connection_set_max_live_messages_size): rename
5133 (dbus_connection_get_outgoing_size): get size of outgoing
5135 (_dbus_connection_set_connection_counter): remove this cruft
5137 2003-04-14 Havoc Pennington <hp@redhat.com>
5139 * dbus/dbus-userdb.c: user database abstraction, mostly to get
5140 caching, but at some point we might want to be able to use a
5143 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
5144 SHA1 conf file to test the sha1 auth mechanism, since the regular
5145 test always uses EXTERNAL when available.
5148 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
5149 add conf file that requires use of sha1 auth
5151 2003-04-13 Havoc Pennington <hp@pobox.com>
5153 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
5154 from Philip Blundell to send messages and monitor them.
5156 2003-04-13 Havoc Pennington <hp@pobox.com>
5158 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
5161 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
5164 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
5165 fix to only recover unused bytes if we're already authenticated
5166 (_dbus_transport_get_is_authenticated): fix to still mark us
5167 authenticated if there are unused bytes.
5169 * bus/dispatch.c: implement security policy checking
5171 * bus/connection.c (bus_transaction_send_from_driver): new
5173 * bus/bus.c (bus_context_check_security_policy): new
5175 * bus/dispatch.c (send_service_nonexistent_error): delete this,
5176 now we just set the DBusError and it gets converted to an error
5179 * bus/connection.c (allow_user_function): enable code using actual
5180 data from the config file
5182 * bus/policy.c (list_allows_user): handle wildcard rules for
5183 user/group connection perms
5185 2003-04-13 Havoc Pennington <hp@pobox.com>
5187 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
5189 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
5191 * bus/policy.c (bus_policy_append_mandatory_rule)
5192 (bus_policy_append_default_rule, bus_policy_append_user_rule)
5193 (bus_policy_append_group_rule): new functions
5195 2003-04-12 Havoc Pennington <hp@pobox.com>
5197 * bus/config-parser.c (bus_config_parser_new): fix a memleak
5199 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
5200 the pid/gid/uid, just for paranoia.
5202 * test/break-loader.c (randomly_do_n_things): find a byte
5203 containing a type code, and randomly change it to a different
5206 2003-04-12 Havoc Pennington <hp@pobox.com>
5208 * bus/policy.h: change BusPolicy to be the thing from the config
5209 file, and rename old BusPolicy to BusClientPolicy
5211 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
5212 match change in how policy works
5214 * dbus/dbus-internals.h: mark assert_not_reached as
5215 __attribute((noreturn))__
5217 2003-04-11 Havoc Pennington <hp@redhat.com>
5219 * doc/dbus-specification.sgml: fix a spot with the wrong name for
5220 the broadcast service. Use boolean return for ServiceExists.
5222 2003-04-11 Havoc Pennington <hp@redhat.com>
5224 * configure.in: add another directory to look for qt in.
5226 2003-04-11 Havoc Pennington <hp@redhat.com>
5228 * AUTHORS: add Colin Walters
5230 2003-04-11 Havoc Pennington <hp@redhat.com>
5236 2003-04-11 Havoc Pennington <hp@redhat.com>
5238 * bus/messagebus.in: remove pid file when stopping the
5239 message bus, since the bus won't have privileges to remove it
5242 2003-04-11 Havoc Pennington <hp@redhat.com>
5244 * bus/bus.c (bus_context_new): move credentials change after
5247 2003-04-11 Havoc Pennington <hp@pobox.com>
5249 * test/decode-gcov.c: add "below average functions" to the
5250 coverage report, and change how some of the code works.
5252 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
5253 not in the coverage stats.
5255 * test/test-service.c (main): use _dbus_verbose not fprintf in a
5256 couple places so running the test suite doesn't result in megaspam.
5258 2003-04-11 Havoc Pennington <hp@pobox.com>
5260 * bus/dispatch.c (check_existent_service_activation): accept a no
5261 memory error in a place we didn't before
5263 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
5264 in case the first one failed," since the test suite is less
5267 2003-04-10 Havoc Pennington <hp@pobox.com>
5269 * bus/dispatch.c (check_segfault_service_activation): add test
5270 for launching an executable that just crashes.
5272 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
5273 don't leave a million cores. We'll see how portable this is.
5275 2003-04-10 Havoc Pennington <hp@pobox.com>
5277 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
5278 the possible parent failures before we fork, so that we don't
5279 fail to create a babysitter after creating the child.
5281 * bus/activation.c (bus_activation_activate_service): kill child
5282 if we don't successfully complete the activation.
5284 2003-04-10 Havoc Pennington <hp@redhat.com>
5286 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
5287 the connection if it's disconnected
5289 * bus/activation.c (bus_activation_service_created): use new
5290 transaction features to roll back removal of pending activation if
5291 we don't successfully create the service after all. Don't remove
5292 pending activation if the function fails.
5294 * dbus/dbus-list.c (_dbus_list_insert_before_link)
5295 (_dbus_list_insert_after_link): new code to facilitate
5298 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
5299 new functionality, so we can preallocate the ability to insert
5302 * bus/connection.c (bus_transaction_add_cancel_hook): new function
5303 allowing us to put custom hooks in a transaction to be used for
5304 cancelling said transaction
5306 * doc/dbus-specification.sgml: add some discussion of secondary
5307 service owners, and disallow zero-length service names
5309 * bus/services.c (bus_registry_acquire_service): new function,
5310 splits out part of bus_driver_handle_acquire_service() and fixes
5311 a bug where we didn't remove the service doing the acquiring
5312 from the secondary queue if we failed to remove the current owner
5313 from the front of the queue.
5315 2003-04-10 Alexander Larsson <alexl@redhat.com>
5317 * doc/dbus-specification.sgml:
5318 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
5320 2003-04-10 Alexander Larsson <alexl@redhat.com>
5325 Added files to cvsignore
5327 * dbus/dbus-message.h:
5328 * dbus/dbus-message.c: (dbus_message_iter_get_named):
5329 Make get_named() take two out argument and return a boolean.
5330 (dbus_message_iter_get_args_valist):
5331 Update usage of get_named().
5332 (dbus_message_iter_append_byte):
5334 (dbus_message_iter_append_named)
5336 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
5339 2003-04-10 Alexander Larsson <alexl@redhat.com>
5341 * dbus/dbus-marshal.[ch]:
5342 Add array_type_pos argument to _dbus_marshal_validate_arg.
5343 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
5345 * dbus/dbus-message.[ch]:
5346 Multi-dimensional arrays have full type specification in the
5347 outermost array. Iter code re-arranged to handle this.
5348 Added some more iter tests.
5350 * doc/dbus-specification.sgml:
5353 Update new array encoding description.
5354 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
5356 * test/data/invalid-messages/array-with-mixed-types.message:
5357 * test/data/valid-messages/array-of-array-of-uint32.message:
5358 Change to the new array format.
5360 * test/data/invalid-messages/too-short-dict.message:
5363 * test/data/valid-messages/recursive-types.message:
5364 Fix up and extend test.
5366 2003-04-10 Havoc Pennington <hp@pobox.com>
5368 * bus/dispatch.c: lots of fixes
5370 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
5371 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
5372 that was crack, broke the test service.
5374 * dbus/dbus-transport.c (_dbus_transport_open): fix error
5375 handling to avoid piling up errors if we get a failure on the
5378 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
5379 pid in assertion failures.
5381 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
5382 to some fixed size of file descriptor array. Don't return TRUE
5383 anytime a timeout exists, that led to lots of busy loop silliness
5386 2003-04-09 Havoc Pennington <hp@redhat.com>
5388 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
5389 I'd checked this in earlier but hadn't.
5391 2003-04-09 Havoc Pennington <hp@redhat.com>
5393 * bus/dispatch.c (bus_dispatch_test): get a bit further through
5394 the activation test (man this is getting old!)
5396 2003-04-09 Havoc Pennington <hp@redhat.com>
5398 * test/test-utils.c: use dispatch status function to fix this up
5400 * bus/connection.c (connection_watch_callback): don't dispatch
5402 (connection_timeout_callback): don't dispatch from here
5403 (bus_connections_setup_connection): set the dispatch status function
5404 (bus_connection_disconnected): unset it
5406 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
5407 used to add a connection to be dispatched
5408 (_dbus_loop_iterate): do the dispatching at the end of each
5411 * dbus/dbus-connection.c
5412 (dbus_connection_set_dispatch_status_function): new function
5413 allowing us to fix up main loop usage
5414 (_dbus_connection_last_unref): free all the various function
5416 (dbus_connection_dispatch): call the DispatchStatusFunction
5417 whenever this function returns
5418 (dbus_connection_handle_watch): call DispatchStatusFunction
5419 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
5420 (reply_handler_timeout): call DispatchStatusFunction
5421 (dbus_connection_flush): call DispatchStatusFunction
5423 2003-04-09 Havoc Pennington <hp@redhat.com>
5425 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
5428 * bus/dispatch.c (check_service_activated): fix bug in test
5430 * dbus/dbus-mainloop.c (check_timeout): fix this up
5432 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
5433 verbose output so we can sort out output from different processes,
5434 e.g. in the activation case.
5436 2003-04-08 Colin Walters <walters@gnu.org>
5438 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
5440 (bus_context_new): Set it.
5441 (bus_context_unref): Use it to delete the pid file.
5443 2003-04-08 Havoc Pennington <hp@redhat.com>
5445 * test/data/invalid-messages/array-with-mixed-types.message:
5446 regression test that fails for the moment
5448 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
5449 tests for convenience
5451 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
5452 array of nil, it broke things.
5454 * test/data/invalid-messages/array-of-nil.message: regression test
5456 * test/data/valid-messages/array-of-array-of-uint32.message:
5457 happened to write this so added it to suite
5459 2003-04-08 Havoc Pennington <hp@redhat.com>
5461 * bus/driver.c (bus_driver_handle_acquire_service): init
5462 retval/reply before checking name
5464 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
5465 recursion depth argument
5467 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
5468 in the public struct for future extension
5470 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
5473 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
5476 * doc/dbus-specification.sgml: fix typo
5478 2003-04-08 Alexander Larsson <alexl@redhat.com>
5480 Implemented recursive types, named types and new-style iters
5483 * glib/test-thread-client.c: (thread_func):
5484 * glib/test-thread-server.c: (handle_test_message):
5485 * test/test-service.c: (handle_echo):
5494 * dbus/dbus-internals.c: (_dbus_type_to_string):
5495 Update for new types.
5497 * dbus/dbus-marshal.[ch]:
5498 Implement recursive types and the new marshalling format.
5499 Remove hardcoded dict marshalling.
5500 Marshal named types.
5502 * dbus/dbus-message-builder.c:
5504 Remove references to old types
5506 * dbus/dbus-message.[ch]:
5507 New non-refcounted iter API that supports recursive iters.
5508 Use iters for appending, including support for recursive
5510 Add byte and named type support.
5511 Update everything to new marshalling formats.
5512 Add tests for new API.
5514 * dbus/dbus-protocol.h:
5515 Remove old array types.
5516 Add types: BYTE, ARRAY, DICT, NAMED
5518 * dbus/dbus-string.c:
5519 * dbus/dbus-sysdeps.c:
5520 Make parse_double locale safe.
5522 * dbus/dbus-test-main.c:
5528 * doc/dbus-specification.sgml:
5531 * test/data/incomplete-messages/missing-body.message:
5532 * test/data/invalid-messages/bad-boolean.message:
5533 * test/data/invalid-messages/bad-boolean-array.message:
5534 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
5535 * test/data/invalid-messages/boolean-has-no-value.message-raw:
5536 * test/data/invalid-messages/too-short-dict.message:
5537 * test/data/valid-messages/dict-simple.message:
5538 * test/data/valid-messages/dict.message:
5539 * test/data/valid-messages/emptiness.message:
5540 * test/data/valid-messages/lots-of-arguments.message:
5541 * test/data/valid-messages/no-padding.message:
5542 * test/data/valid-messages/recursive-types.message:
5543 Add missing NAME fields
5544 Fix up dicts & arrays
5546 * test/data/invalid-messages/dict-with-nil-value.message:
5547 Removed, this is not invalid anymore.
5549 * test/data/valid-messages/recursive-types.message:
5550 Add new test for deeply recursive types.
5552 2003-04-07 Havoc Pennington <hp@pobox.com>
5554 * bus/driver.c (bus_driver_handle_acquire_service): return an
5555 error if you try to acquire a service that starts with ':'
5557 2003-04-07 Havoc Pennington <hp@redhat.com>
5559 * doc/dbus-specification.sgml: require that base service names
5560 start with ':' and that the base service is created/deleted
5561 as first and last things a connection does on the bus
5563 * bus/dispatch.c (check_existent_service_activation): lots more
5564 work on the activation test; it doesn't fully pass yet...
5566 * test/test-service.c (main): fix so we don't memleak the
5567 connection to the message bus
5568 (filter_func): accept a message asking us to exit
5570 2003-04-06 Havoc Pennington <hp@pobox.com>
5572 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
5575 * configure.in: fixes to Qt detection from Colin Walters
5577 * doc/Makefile.am: Only remove generated docbook dirs if they
5578 exist, from Colin Walters
5580 * dbus/dbus-bus.c: change how we set well-known connections to
5581 NULL, so that it works if a single connection is stored in
5582 two well-known array slots.
5584 * test/Makefile.am: remove a lot of stuff that isn't immediately
5585 useful, it's in CVS history if we want it.
5587 * test/test-service.c: use dbus-mainloop instead of that
5590 2003-04-06 Havoc Pennington <hp@pobox.com>
5592 * dbus/Makefile.am: split lists of sources into stuff that goes in
5593 the library, util functions that go in the lib and are also used
5594 elsewhere, and util functions that are used in tests/daemon but
5595 don't go in the lib.
5597 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
5598 here so it can be used in test binaries also
5600 2003-04-06 Havoc Pennington <hp@pobox.com>
5602 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
5603 here in the parent process, so we can return an error if it
5604 fails. Also, move some of the code into the child so the parent
5605 is less hosed if we fail midway through.
5607 * bus/bus.c (bus_context_new): move pidfile detection further up
5608 in the function, before we start overwriting sockets and such.
5610 * bus/messagebus.in: adjust this a bit, not sure if it will work.
5612 * configure.in: add --with-system-pid-file and --with-system-socket
5614 2003-04-06 Colin Walters <walters@verbum.org>
5616 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
5618 * bus/system.conf.in: Declare a pidfile.
5620 * bus/bus.c (bus_context_new): Test for an existing pid file, and
5621 create one (if appropriate).
5623 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
5624 (struct BusConfigParser) [pidfile]: New.
5625 (element_type_to_name, merge_included, start_busconfig_child)
5626 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
5627 (bus_config_parser_unref): Free it.
5628 (bus_config_parser_get_pidfile): New function.
5630 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
5632 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
5634 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
5636 * dbus/dbus-sysdeps.h: Prototype it.
5638 2003-04-06 Havoc Pennington <hp@pobox.com>
5640 * bus/bus.c (bus_context_new): print the address in here, rather
5641 than in main(), because we need to do it before forking the daemon
5643 * bus/dispatch.c (send_service_nonexistent_error): set the sender
5644 on the service nonexistent error
5646 * bus/driver.c (bus_driver_handle_acquire_service): set the
5647 sender on the AcquireService reply
5649 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
5650 server also listen on a UNIX socket so services can connect to it.
5652 2003-04-06 Havoc Pennington <hp@pobox.com>
5654 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
5655 so it detects deadlocks and also we actually init threads when
5658 2003-04-06 Havoc Pennington <hp@pobox.com>
5660 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
5661 save the domain socket name, and unlink it when we disconnect the
5662 server. Means that at least when we exit normally, we won't leave
5663 a bunch of junk in /tmp
5665 * dbus/dbus-transport-unix.c
5666 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
5667 memory management). (I was making a real change here but then
5670 2003-04-06 Havoc Pennington <hp@pobox.com>
5672 * bus/bus.c (bus_context_new): fix wrong handling of
5673 server_data_slot_unref() in the error case.
5675 * dbus/dbus-internals.h (_dbus_assert): change so it passes
5676 "(condition) != 0" to _dbus_real_assert so that
5677 "_dbus_assert (pointer)" doesn't cause a warning
5679 * bus/main.c (main): accept --print-address option to print out
5680 the message bus address
5682 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
5684 * dbus/dbus-transport.c (_dbus_transport_open): special error for
5685 "tmpdir" option to unix: address on client side
5687 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
5690 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
5691 we can use to create sockets in the test suite.
5693 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
5694 cleanly. To be used for testing.
5696 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
5698 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
5700 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
5701 handle trying to call this when there's no servers active
5703 2003-04-05 Havoc Pennington <hp@pobox.com>
5709 2003-04-05 Havoc Pennington <hp@pobox.com>
5711 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
5712 crash on startup. Need to get "try starting the daemon"
5713 in the test suite I guess. ;-)
5715 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
5716 tracked the number of open connections; it's better done in
5717 application-specific code as you want it to span all servers etc.
5719 2003-04-05 Havoc Pennington <hp@pobox.com>
5721 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
5722 patch from Colin Walters
5724 2003-04-05 Havoc Pennington <hp@pobox.com>
5726 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
5727 reality; in fact multiple mechanisms are allowed.
5729 * dbus/dbus-internals.c (_dbus_real_assert)
5730 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
5731 _dbus_assert_not_reached() into functions, so that they don't show
5732 up in basic block counts for test coverage, and don't use up as
5733 much disk space. Does mean slower execution speed though, so
5734 assumes --disable-asserts is the normal production case.
5736 2003-04-05 Havoc Pennington <hp@pobox.com>
5738 * test/Makefile.am (dist-hook): also dist *.in files
5744 2003-04-05 Havoc Pennington <hp@pobox.com>
5746 * dbus/dbus-string.c: docs warning
5748 * dbus/dbus-spawn.c: missing docs
5750 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
5752 2003-04-05 Havoc Pennington <hp@pobox.com>
5754 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
5757 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
5758 to -1 once we've reaped the babysitter
5759 (_dbus_babysitter_handle_watch): do as much work as we can, not
5762 * bus/activation.c: add code using DBusBabysitter so that we
5763 handle it when a service fails to start up properly.
5764 (bus_activation_service_created): don't remove the activation
5765 entries as we go, just let them get removed when we free the pending
5766 activation. Unref reply messages after sending them.
5768 2003-04-05 Havoc Pennington <hp@pobox.com>
5770 * test/decode-gcov.c (main): print per-directory stats in the report
5772 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
5774 2003-04-05 Havoc Pennington <hp@pobox.com>
5776 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
5778 * test/decode-gcov.c: hack up a little program to suck data
5779 out of gcov files. Yes this is sort of silly.
5781 * configure.in: define something in config.h and do an
5782 AM_CONDITIONAL when gcov is enabled
5784 2003-04-04 Havoc Pennington <hp@redhat.com>
5786 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
5787 return a "babysitter" object that is used to monitor the status of
5788 the spawned process and reap it when required.
5790 * test/test-segfault.c, test/test-exit.c,
5791 test/test-sleep-forever.c: binaries that do various lame things,
5792 used in the test suite.
5794 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
5796 2003-04-03 Havoc Pennington <hp@pobox.com>
5798 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
5799 in preparation for modifying it, dbus-sysdeps is getting
5802 2003-04-03 Havoc Pennington <hp@redhat.com>
5804 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
5807 * bus/*.[hc]: adapt to mainloop change
5809 2003-04-03 Havoc Pennington <hp@redhat.com>
5811 * bus/activation.c (load_directory): fix up memleaks
5812 (bus_activation_entry_free): free the entry
5814 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
5815 we get one from the message bus; fix memleaks.
5817 * dbus/dbus-message.c (dbus_set_error_from_message): new function
5819 2003-04-03 Havoc Pennington <hp@pobox.com>
5821 * bus/config-parser.c (bus_config_parser_unref): free
5822 list of mechanisms, bug discovered by test suite enhancements
5823 (putting system.conf and session.conf into suite)
5825 * test/Makefile.am, test/test-service.c: add placeholder for a
5826 test service that we'll activate as part of test suite. Doesn't
5829 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
5830 setting NULL value, and use system malloc not dbus_malloc()
5831 when we have unavoidable memleakage.
5833 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
5834 didn't work, and support DBUS_BUS_ACTIVATION.
5836 * bus/activation.c (child_setup): pass our well-known bus type to
5839 * bus/config-parser.c: support <type> to specify well-known type
5841 * doc/dbus-specification.sgml: document the env variables to
5842 locate well-known buses and find service activator
5844 2003-04-02 Havoc Pennington <hp@redhat.com>
5846 * test/Makefile.am (all-local): add a rule to copy tests to
5847 builddir, so we can have generated tests. Use this to remove the
5848 silly hack for testing system.conf and session.conf. Will use this
5849 shortly to generate .service files pointing to test binaries.
5851 2003-04-02 Havoc Pennington <hp@redhat.com>
5853 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
5854 current alloc and needed new length, not max of the doubled
5855 allocation and needed new length. Also, when building tests,
5856 don't do the double-allocation stuff, just realloc every time.
5858 2003-04-02 Havoc Pennington <hp@redhat.com>
5860 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
5862 (_dbus_string_get_dirname): new
5863 (_dbus_sysdeps_test): new
5864 (_dbus_directory_open): include dirnames in error messages
5866 * bus/config-parser.c: interpret <include> and <includedir> and
5867 <servicedir> relative to config file location if the given
5868 filename is not absolute.
5870 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
5872 2003-04-02 Havoc Pennington <hp@redhat.com>
5874 * bus/connection.c (bus_transaction_send_error_reply): set sender
5875 service for the error, and unref the reply on success
5877 * bus/activation.c: convert to use BusTransaction so OOM can be
5879 (bus_activation_service_created): set sender of the message
5881 2003-04-01 Havoc Pennington <hp@redhat.com>
5883 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
5884 <includedir> (at least mostly)
5886 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
5887 first, then the user ID
5889 2003-04-01 Havoc Pennington <hp@pobox.com>
5891 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
5894 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
5896 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
5898 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
5899 socket 0777, and unlink any existing socket.
5901 * bus/bus.c (bus_context_new): change our UID/GID and fork if
5902 the configuration file so specifies; set up auth mechanism
5905 * bus/config-parser.c (bus_config_parser_content): add support
5906 for <fork> option and fill in code for <auth>
5908 * bus/system.conf.in: add <fork/> to default configuration,
5909 and limit auth mechanisms to EXTERNAL
5911 * doc/config-file.txt (Elements): add <fork>
5913 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
5914 (_dbus_change_identity): new function
5916 2003-03-31 Havoc Pennington <hp@redhat.com>
5918 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
5919 (_dbus_listen_unix_socket): fix off-by-one error in null
5920 termination spotted by Nalin
5922 2003-03-31 Havoc Pennington <hp@redhat.com>
5924 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
5925 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
5926 having a real home directory available.
5928 2003-03-31 Havoc Pennington <hp@redhat.com>
5930 * bus/Makefile.am (install-data-hook): create /var/run/dbus
5932 * bus/messagebus.in: add init script for Red Hat /etc/init.d
5934 * configure.in: add support for specifying a style of init script
5937 2003-03-31 Havoc Pennington <hp@redhat.com>
5939 Fix some annoying DBusString API and fix all affected code.
5941 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
5943 (_dbus_string_get_data): change to return string instead of using
5945 (_dbus_string_get_const_data): ditto
5946 (_dbus_string_get_data_len): ditto
5947 (_dbus_string_get_const_data_len): ditto
5949 2003-03-31 Havoc Pennington <hp@redhat.com>
5951 * bus/main.c (main): fix up the command line arguments to be nicer
5953 2003-03-31 Havoc Pennington <hp@redhat.com>
5955 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
5956 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
5957 final location that lands in the config file
5959 * bus/config-loader-expat.c (bus_config_load): fix type of
5962 * doc/TODO: remove TODO item for dbus_bus_get()
5964 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
5966 2003-03-31 Havoc Pennington <hp@pobox.com>
5968 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
5969 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
5970 argument since they are always client side
5972 * dbus/dbus-server.c (dbus_server_get_address): new function
5974 * bus/main.c (main): take the configuration file as an argument.
5976 * test/data/valid-config-files/debug-allow-all.conf: new file to
5977 use with dispatch.c tests for example
5979 * bus/test-main.c (main): require test data dir
5981 * bus/bus.c (bus_context_new): change this to take a
5982 configuration file name as argument
5984 * doc/config-file.txt (Elements): add <servicedir>
5986 * bus/system.conf, bus/session.conf: new files
5988 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
5989 well-known socket if none set
5991 * configure.in: create system.conf and session.conf
5993 2003-03-30 Havoc Pennington <hp@pobox.com>
5995 * bus/config-parser.c: hacking
5997 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
5998 to shut down, since it could cause weirdness with the DBusList
6001 * dbus/dbus-list.c (_dbus_list_test): add tests for the
6002 link-oriented stack routines
6003 (alloc_link): free the mempool if the first alloc from it fails
6005 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
6007 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
6009 (_dbus_string_skip_white): new
6011 * doc/config-file.txt (Elements): add <includedir>
6013 2003-03-28 Havoc Pennington <hp@pobox.com>
6015 * dbus/dbus-string.c (_dbus_string_copy_data_len)
6016 (_dbus_string_copy_data): new functions
6018 2003-03-28 Anders Carlsson <andersca@codefactory.se>
6020 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
6024 * dbus/dbus-memory.c:
6027 2003-03-28 Havoc Pennington <hp@pobox.com>
6029 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
6030 I think it may have just been superstition. Not sure.
6032 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
6033 failures that were not being handled.
6035 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
6037 * dbus/dbus-memory.c: add ability to set number of mallocs in a
6038 row that will fail on out-of-memory.
6040 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
6041 function for testing out-of-memory handling.
6043 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
6044 allocation functions, they do map exactly to the expat ones.
6046 2003-03-27 Havoc Pennington <hp@redhat.com>
6048 * bus/config-loader-libxml.c (bus_config_load): add another error
6051 2003-03-26 Anders Carlsson <andersca@codefactory.se>
6054 Add note about automatic service activation.
6056 * doc/dbus-specification.sgml:
6057 Rename the specification and clarify a few things.
6059 2003-03-26 Anders Carlsson <andersca@codefactory.se>
6062 * dbus/dbus-address.c:
6064 * dbus/dbus-marshal.c:
6065 * dbus/dbus-server-debug-pipe.c:
6066 * dbus/dbus-transport-unix.c:
6067 Fix documentation warnings.
6069 2003-03-26 Havoc Pennington <hp@pobox.com>
6071 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
6072 after every test so it's quick and easy to see which leaked, and
6073 so we test multiple dbus_shutdown() calls
6075 * configure.in: change configure.in XML stuff to also support
6078 * config-loader-libxml.c: some hacking
6080 * config-loader-expat.c: some hacking
6082 * config-parser.c: some hacking, plus tests
6084 2003-03-25 Havoc Pennington <hp@redhat.com>
6086 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
6088 * configure.in: add --with-xml option to specify XML library,
6089 right now only libxml is supported.
6091 * bus/config-loader-libxml.c, config-parser.c: sync some minor
6092 nonworking code between home and work, still just stubs
6094 2003-03-24 Havoc Pennington <hp@redhat.com>
6096 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
6099 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
6100 NULL argument for "message" if the error is a well-known one,
6101 fill in a generic message in this case.
6103 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
6106 * bus/test.c (bus_test_flush_bus): add
6108 * bus/policy.c (bus_policy_test): test code stub
6110 2003-03-24 Havoc Pennington <hp@pobox.com>
6112 * bus/connection.c (bus_connections_setup_connection): set up
6113 the "can this user connect" function, but it always returns
6114 TRUE until we have a config file parser so we can have a config
6115 file that allows connections.
6117 2003-03-23 Havoc Pennington <hp@pobox.com>
6119 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
6120 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
6121 the mutex, so we can check for proper memory management
6124 * dbus/dbus-dataslot.c: remove the mutex from
6125 DBusDataSlotAllocator and lock it manually when using it,
6126 to simplify fitting it into the global slots framework.
6128 * dbus/dbus-threads.c (init_static_locks): rework how we're
6129 handling global locks so they are easily shut down.
6131 * bus/policy.c (bus_policy_append_rule): fix
6133 * bus/test-main.c (main): check for memleaks
6135 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
6136 test suite check for memleaks
6138 * dbus/dbus-memory.c: add support in test mode for tracking
6139 number of outstanding blocks
6141 2003-03-23 Havoc Pennington <hp@pobox.com>
6143 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
6146 * dbus/dbus-hash.h: add ULONG hash keys
6148 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
6149 (_dbus_get_group_id): new function
6151 2003-03-20 Havoc Pennington <hp@redhat.com>
6153 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
6155 (dbus_connection_get_unix_user): new function
6157 2003-03-20 Havoc Pennington <hp@pobox.com>
6159 * bus/connection.c (bus_connection_send_oom_error): assert that
6160 message has a sender
6161 (connection_execute_transaction): ditto
6162 (bus_connection_preallocate_oom_error): fix to set the sender, and
6163 set recipient to the destination service, not the bus driver
6165 * bus/policy.c: hacking
6167 * dbus/dbus-message.c (dbus_message_service_is): new function
6168 (dbus_message_sender_is): new
6170 2003-03-19 Havoc Pennington <hp@redhat.com>
6172 * bus/policy.c: start sketching code for policy restrictions on
6173 what connections can do.
6175 2003-03-18 Havoc Pennington <hp@redhat.com>
6177 * doc/TODO: some notes on high-level todo items. Little nitpick
6178 stuff is all in @todo, so no need to add it here.
6180 * doc/config-file.txt: some notes on how config file might look
6182 2003-03-18 Anders Carlsson <andersca@codefactory.se>
6188 2003-03-17 Havoc Pennington <hp@redhat.com>
6190 * dbus/dbus-internals.h: add gcc attributes so that
6191 our printf-style functions warn on bad arguments to
6194 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
6197 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
6200 2003-03-17 Havoc Pennington <hp@redhat.com>
6202 * bus/test-main.c (main): make it print something as it runs
6203 so make check doesn't look stuck
6205 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
6206 from CVS, now obsolete
6208 2003-03-17 Anders Carlsson <andersca@codefactory.se>
6210 * bus/dispatch.c: (bus_dispatch):
6211 Refetch the service name since it may have been reallocated
6212 when dbus_message_set_sender was called.
6214 * dbus/dbus-sysdeps.c: (_dbus_accept):
6215 Add address and address length variables and use them to stop
6216 valgrind from complaining.
6218 2003-03-17 Havoc Pennington <hp@pobox.com>
6220 All tests pass, no memleaks, no valgrind complaints.
6222 * bus/test.c: refcount handler_slot
6224 * bus/connection.c (bus_connections_new): refcount
6225 connection_data_slot
6227 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
6228 bytes so that auth scripts pass.
6230 * bus/dispatch.c: init message_handler_slot so it gets allocated
6233 * bus/dispatch.c (message_handler_slot_ref): fix memleak
6235 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
6236 dealloc server_pipe_hash when no longer used for benefit of
6239 * dbus/dbus-auth.c (process_command): memleak fix
6241 * bus/dispatch.c (check_hello_message): memleak fix
6243 2003-03-16 Havoc Pennington <hp@pobox.com>
6245 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
6247 2003-03-17 Anders Carlsson <andersca@codefactory.se>
6249 * bus/activation.c (bus_activation_activate_service): Append
6250 the pending activation entry to the list of pending activations.
6252 2003-03-16 Havoc Pennington <hp@pobox.com>
6254 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
6257 * dbus/dbus-address.c (create_entry): fix OOM handling when
6258 failing to alloc entry->method
6260 2003-03-16 Havoc Pennington <hp@pobox.com>
6262 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
6265 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
6266 add some missing dbus_set_result
6268 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
6269 alloc the DBusMessageHandler
6271 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
6272 the transport here, since we call this from the finalizer; it
6273 resulted in a double-finalize.
6275 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
6276 where we tried to use transport->connection that was NULL,
6277 happened when transport was disconnected early on due to OOM
6279 * bus/*.c: adapt to handle OOM for watches/timeouts
6281 * dbus/dbus-transport-unix.c: port to handle OOM during
6284 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
6285 reference to unused bytes instead of a copy
6287 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
6290 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
6293 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
6296 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6298 * doc/dbus-specification.sgml:
6299 Document reply message for ActivateService.
6301 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6303 * bus/activation.c: (bus_pending_activation_entry_free),
6304 (bus_pending_activation_free), (bus_activation_new),
6305 (bus_activation_unref), (bus_activation_service_created),
6306 (bus_activation_activate_service):
6308 * bus/bus.c: (bus_context_new):
6309 * bus/desktop-file.c: (new_section):
6310 * bus/driver.c: (bus_driver_send_service_deleted),
6311 (bus_driver_handle_activate_service):
6312 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
6314 * dbus/dbus-connection.c:
6315 (dbus_connection_send_with_reply_and_block):
6316 * dbus/dbus-message.c: (dbus_message_append_args_valist):
6317 * dbus/dbus-protocol.h:
6318 Make activation work better. Now pending activations will be queued
6319 and the daemon won't try to activate services that are already registered.
6321 2003-03-16 Havoc Pennington <hp@pobox.com>
6323 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
6326 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
6327 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
6329 2003-03-16 Havoc Pennington <hp@pobox.com>
6331 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
6332 this. always run the test suite before commit...
6334 * bus/*: adapt to DBusConnection API changes
6336 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
6337 requires renaming stuff to avoid dbus_connection_dispatch name
6340 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
6343 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
6344 separate from _dbus_message_loader_return_buffer()
6346 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
6347 this, because it's now always broken to use; the number of
6348 messages in queue vs. the number still buffered by the message
6349 loader is undefined/meaningless. Should use
6350 dbus_connection_get_dispatch_state().
6351 (dbus_connection_dispatch): rename from
6352 dbus_connection_dispatch_message
6354 2003-03-16 Havoc Pennington <hp@pobox.com>
6356 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
6359 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6361 * dbus/dbus-connection.c:
6362 (dbus_connection_send_with_reply_and_block):
6363 Decrease connection->n_incoming when removing an entry
6365 * dbus/dbus-dict.c: (dbus_dict_entry_free),
6366 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
6367 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
6368 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
6369 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
6370 (dbus_dict_get_byte_array):
6371 Handle NULL arrays and strings. Also add support for byte arrays.
6373 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
6374 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
6375 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6376 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6377 (_dbus_demarshal_dict), (demarshal_and_validate_len),
6378 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
6379 * dbus/dbus-marshal.h:
6380 Add support for marshalling and demarshalling empty arrays and strings.
6382 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6383 (dbus_message_append_string_array),
6384 (dbus_message_iter_get_boolean),
6385 (dbus_message_iter_get_boolean_array),
6386 (dbus_message_iter_get_int32_array),
6387 (dbus_message_iter_get_uint32_array),
6388 (dbus_message_iter_get_double_array),
6389 (dbus_message_iter_get_byte_array),
6390 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
6391 (check_message_handling):
6392 Add support for getting empty arrays and dicts.
6394 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
6395 Don't do any validation at all for now, that's better than just checking
6398 * test/data/valid-messages/emptiness.message:
6399 New test message with lots of empty arrays.
6401 2003-03-16 Havoc Pennington <hp@pobox.com>
6403 * dbus/dbus-connection.c
6404 (_dbus_connection_queue_received_message_link): new function that
6405 can't fail due to OOM
6407 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
6408 new function pops a message together with a list link
6411 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
6412 message queuing functions to avoid needing to alloc memory
6414 2003-03-16 Havoc Pennington <hp@pobox.com>
6416 Oops - test code was only testing failure of around 30 of the
6417 mallocs in the test path, but it turns out there are 500+
6418 mallocs. I believe this was due to misguided linking setup such
6419 that there was one copy of dbus_malloc etc. in the daemon and one
6420 in the shared lib, and only daemon mallocs were tested. In any
6421 case, the test case now tests all 500+ mallocs, and doesn't pass
6422 yet, though there are lots of fixes in this patch.
6424 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
6425 this so that it doesn't need to allocate memory, since it
6426 has no way of indicating failure due to OOM (and would be
6427 annoying if it did).
6429 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
6431 * bus/Makefile.am: rearrange to create two self-contained
6432 libraries, to avoid having libraries with overlapping symbols.
6433 that was resulting in weirdness, e.g. I'm pretty sure there
6434 were two copies of global static variables.
6436 * dbus/dbus-internals.c: move the malloc debug stuff to
6439 * dbus/dbus-list.c (free_link): free list mempool if it becomes
6442 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
6444 * dbus/dbus-address.c (dbus_parse_address): free list nodes
6447 * bus/dispatch.c (bus_dispatch_add_connection): free
6448 message_handler_slot when no longer using it, so
6449 memory leak checkers are happy for the test suite.
6451 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
6453 * bus/bus.c (new_connection_callback): disconnect in here if
6454 bus_connections_setup_connection fails.
6456 * bus/connection.c (bus_connections_unref): fix to free the
6458 (bus_connections_setup_connection): if this fails, don't
6459 disconnect the connection, just be sure there are no side
6462 * dbus/dbus-string.c (undo_alignment): unbreak this
6464 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
6466 (_dbus_auth_new): fix the order in which we free strings
6469 * bus/connection.c (bus_connection_disconnected): fix to
6470 not send ServiceDeleted multiple times in case of memory
6473 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
6474 get the base service name
6475 (dbus_bus_register_client): don't return base service name,
6476 instead store it on the DBusConnection and have an accessor
6478 (dbus_bus_register_client): rename dbus_bus_register()
6480 * bus/dispatch.c (check_hello_message): verify that other
6481 connections on the bus also got the correct results, not
6482 just the one sending hello
6484 2003-03-15 Havoc Pennington <hp@pobox.com>
6486 Make it pass the Hello handling test including all OOM codepaths.
6487 Now to do other messages...
6489 * bus/services.c (bus_service_remove_owner): fix crash when
6490 removing owner from an empty list of owners
6491 (bus_registry_ensure): don't leave service in the list of
6492 a connection's owned services if we fail to put the service
6495 * bus/connection.c (bus_connection_preallocate_oom_error): set
6496 error flag on the OOM error.
6498 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
6499 handle _dbus_transport_set_connection failure
6501 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
6502 to create watches up front and simply enable/disable them as
6504 (unix_connection_set): this can now fail on OOM
6506 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
6507 of enabling/disabling a watch or timeout.
6509 * bus/loop.c (bus_loop_iterate): don't touch disabled
6512 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
6514 2003-03-15 Havoc Pennington <hp@pobox.com>
6516 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
6517 write useful test code, after all that futzing around ;-)
6519 Test does not yet pass because we can't handle OOM in
6520 _dbus_transport_messages_pending (basically,
6521 dbus_connection_preallocate_send() does not prealloc the write
6522 watch). To fix this, I think we need to add new stuff to
6523 set_watch_functions, namely a SetEnabled function so we can alloc
6524 the watch earlier, then enable it later.
6526 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
6527 dbus-memory.c to the convenience lib
6529 * bus/test.c: rename some static functions to keep them clearly
6530 distinct from stuff in connection.c. Handle client disconnection.
6532 2003-03-14 Havoc Pennington <hp@pobox.com>
6534 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
6535 transport, tests more of the real codepath. Set up clients
6536 with bus_setup_debug_client.
6538 * bus/test.c (bus_setup_debug_client): function to set up debug
6539 "clients" on the main loop
6541 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
6544 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
6547 * dbus/dbus-server-debug.c: support a debug server based on pipes
6549 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
6550 (_dbus_close): new function
6552 * configure.in: check for socketpair
6554 2003-03-14 Havoc Pennington <hp@redhat.com>
6556 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
6559 * dbus/dbus-transport-debug.c: rework this a good bit to be
6560 less complicated. hopefully still works.
6562 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
6565 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
6568 * dbus/dbus-message.c (dbus_message_copy): rename from
6569 dbus_message_new_from_message, fix it up to copy
6570 all the message fields, add test case
6572 * bus/dispatch.c (bus_dispatch_test): add some more test code,
6573 not quite passing yet
6575 2003-03-14 Havoc Pennington <hp@pobox.com>
6577 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
6578 until no work remains" in test code. (the large diff here
6579 is just code movement, no actual changes)
6581 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
6582 1, no point waiting around for test code.
6583 (_dbus_server_debug_accept_transport): unref the timeout
6584 after adding it (right?)
6586 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
6588 2003-03-13 Havoc Pennington <hp@redhat.com>
6590 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
6593 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
6596 * dbus/dbus-connection.h: Make AddWatchFunction and
6597 AddTimeoutFunction return a bool so they can fail on out-of-memory
6599 * bus/bus.c (bus_context_new): set up timeout handlers
6601 * bus/connection.c (bus_connections_setup_connection): set up
6604 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
6607 * bus/bus.c (bus_context_new): adapt to changes
6609 * bus/connection.c: adapt to changes
6611 * test/watch.c: adapt to DBusWatch changes
6613 * bus/dispatch.c (bus_dispatch_test): started adding this but
6616 2003-03-14 Anders Carlsson <andersca@codefactory.se>
6618 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
6620 2003-03-13 Havoc Pennington <hp@pobox.com>
6622 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
6623 set up a test framework as for the library
6625 2003-03-12 Havoc Pennington <hp@pobox.com>
6627 Throughout: purge global variables, introduce BusActivation,
6628 BusConnections, BusRegistry, etc. objects instead.
6630 * bus/bus.h, bus/bus.c: introduce BusContext as a global
6633 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
6634 going to redo this a bit differently I think
6636 2003-03-12 Havoc Pennington <hp@redhat.com>
6638 Mega-patch that gets the message bus daemon initially handling
6639 out-of-memory. Work still needed. Also lots of random
6640 moving stuff to DBusError instead of ResultCode.
6642 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
6644 * dbus/dbus-connection.c
6645 (dbus_connection_send_with_reply_and_block): use DBusError
6647 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
6650 * dbus/dbus-connection.c (dbus_connection_send): drop the result
6651 code here, as the only failure possible is OOM.
6653 * bus/connection.c (bus_connection_disconnect):
6654 rename bus_connection_disconnected as it's a notification only
6656 * bus/driver.c (bus_driver_handle_acquire_service): don't free
6657 "name" on get_args failure, should be done by get_args;
6658 don't disconnect client for bad args, just return an error.
6659 (bus_driver_handle_service_exists): ditto
6661 * bus/services.c (bus_services_list): NULL-terminate returned array
6663 * bus/driver.c (bus_driver_send_service_lost)
6664 (bus_driver_send_service_acquired): send messages from driver to a
6665 specific client to the client's unique name, not to the broadcast
6668 * dbus/dbus-message.c (decode_header_data): reject messages that
6669 contain no name field
6670 (_dbus_message_get_client_serial): rename to
6671 dbus_message_get_serial and make public
6672 (_dbus_message_set_serial): rename from set_client_serial
6673 (_dbus_message_set_reply_serial): make public
6674 (_dbus_message_get_reply_serial): make public
6676 * bus/connection.c (bus_connection_foreach): allow stopping
6677 iteration by returning FALSE from foreach function.
6679 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
6680 (dbus_connection_free_preallocated_send)
6681 (dbus_connection_preallocate_send): new API for sending a message
6682 without possibility of malloc failure.
6683 (dbus_connection_send_message): rename to just
6684 dbus_connection_send (and same for whole function family)
6686 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
6688 * dbus/dbus-sysdeps.c (_dbus_exit): new function
6690 * bus/activation.c: handle/return errors
6692 * dbus/dbus-errors.h: add more DBUS_ERROR #define
6694 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
6695 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
6696 (_dbus_result_from_errno): move to this file
6698 2003-03-10 Anders Carlsson <andersca@codefactory.se>
6700 * dbus/dbus-marshal.c:
6701 (_dbus_marshal_set_string):
6702 Take a length argument so we can marshal the correct string
6705 (_dbus_marshal_dict), (_dbus_demarshal_dict),
6706 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
6707 (_dbus_marshal_test):
6708 * dbus/dbus-marshal.h:
6709 Add support for marshalling and demarshalling dicts.
6711 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6712 Add support for TYPE DICT.
6714 * dbus/dbus-message.c: (set_string_field):
6715 Adjust header padding.
6717 (dbus_message_append_args_valist), (dbus_message_append_dict),
6718 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
6719 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
6720 (check_message_handling), (check_have_valid_message):
6721 * dbus/dbus-message.h:
6722 Add functions for setting and getting dicts.
6724 * dbus/dbus-protocol.h:
6730 * doc/dbus-specification.sgml:
6731 Add information about how dicts are marshalled.
6733 * test/data/invalid-messages/dict-with-nil-value.message:
6734 * test/data/invalid-messages/too-short-dict.message:
6735 * test/data/valid-messages/dict-simple.message:
6736 * test/data/valid-messages/dict.message:
6737 Add sample messages containing dicts.
6739 2003-03-08 Anders Carlsson <andersca@codefactory.se>
6741 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
6743 2003-03-07 Anders Carlsson <andersca@codefactory.se>
6746 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
6747 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
6748 (dbus_dict_set_int32), (dbus_dict_set_uint32),
6749 (dbus_dict_set_double), (dbus_dict_set_string),
6750 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
6751 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
6752 (dbus_dict_set_string_array), (_dbus_dict_test):
6754 Fix according to comments from Havoc.
6756 2003-03-06 Michael Meeks <michael@server.home>
6758 * configure.in: if we don't have kde-config, disable have_qt.
6760 2003-03-07 Anders Carlsson <andersca@codefactory.se>
6765 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
6766 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
6767 (dbus_dict_remove), (dbus_dict_get_value_type),
6768 (dbus_dict_get_keys), (dbus_dict_put_boolean),
6769 (dbus_dict_put_int32), (dbus_dict_put_uint32),
6770 (dbus_dict_put_double), (dbus_dict_put_string),
6771 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
6772 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
6773 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
6774 (dbus_dict_get_int32), (dbus_dict_get_uint32),
6775 (dbus_dict_get_double), (dbus_dict_get_string),
6776 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
6777 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
6778 (dbus_dict_get_string_array), (_dbus_dict_test):
6780 Add DBusDict implementation
6782 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
6786 2003-03-04 Havoc Pennington <hp@pobox.com>
6788 * test/data/auth/*: adapt to changes
6790 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
6791 USERID_BASE64 and change USERNAME_BASE64 to put in username not
6794 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
6795 more stuff from being in a context name, to make the protocol
6796 simpler to deal with
6798 * dbus/dbus-errors.c (dbus_error_has_name): new function
6799 (dbus_error_is_set): new function
6801 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
6802 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
6804 * dbus/dbus-connection.c (dbus_connection_flush): also read
6805 messages during a flush operation
6807 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
6809 2003-03-05 Anders Carlsson <andersca@codefactory.se>
6811 * configure.in: Check for gethostbyname on Solaris.
6813 * dbus/dbus-transport.c: (_dbus_transport_open):
6814 Remove duplicate "tcp" entry.
6816 * doc/dbus-specification.sgml:
6817 Clarify some things.
6819 2003-03-05 Anders Carlsson <andersca@codefactory.se>
6821 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
6822 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
6823 (_dbus_keyring_test):
6824 * dbus/dbus-md5.c: (_dbus_md5_compute):
6825 * dbus/dbus-sha.c: (_dbus_sha_compute):
6828 2003-03-05 Anders Carlsson <andersca@codefactory.se>
6830 * README: Add some things.
6832 2003-03-04 Anders Carlsson <andersca@codefactory.se>
6834 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
6835 after case DBUS_TYPE_BOOELAN.
6837 2003-03-02 Havoc Pennington <hp@pobox.com>
6839 * test/break-loader.c (randomly_set_extreme_ints): add test that
6840 sets really huge and small integers
6842 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
6843 that length of boolean array fits in the string, and that
6844 string has room for boolean value in single-bool case.
6846 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
6847 optional value to "ALIGN" command which is what to fill the
6850 * test/data/valid-messages/no-padding.message: add regression
6851 test for the message padding problem
6853 2003-03-02 Havoc Pennington <hp@pobox.com>
6855 * dbus/dbus-message.c (decode_header_data): fix to always init
6856 message_padding, from Benjamin Dauvergne
6858 2003-03-02 Havoc Pennington <hp@pobox.com>
6864 2003-03-01 Joe Shaw <joe@assbarn.com>
6866 * configure.in: Check for "struct cmsgcred" and try to access its
6867 members for BSD-like unices.
6869 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
6870 _dbus_read_credentials_unix_socket().
6871 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
6872 read() for reading the credential byte off the unix socket. Use
6873 struct cmsgcred on systems that support it.
6875 2003-02-27 Alexander Larsson <alexl@redhat.com>
6879 Make gthreads-2.0 dependency optional. Don't build thread test if
6882 2003-02-27 Havoc Pennington <hp@pobox.com>
6884 * dbus/dbus-connection.c
6885 (dbus_connection_send_message_with_reply_and_block): fix doh!
6886 doh! doh! bug that resulted in never removing a reply from the
6887 queue, no wonder we called get_reply_serial so much ;-)
6889 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
6890 and client serial instead of demarshaling them every time
6892 2003-02-27 Havoc Pennington <hp@pobox.com>
6894 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
6895 more inlined, using dbus-string-private.h, speeds things up
6898 * dbus/dbus-string.c (_dbus_string_free): apply align offset
6899 when freeing the string
6900 (_dbus_string_steal_data): fix for align offset
6901 (undo_alignment): new function
6903 2003-02-26 Havoc Pennington <hp@redhat.com>
6905 All kinds of audit fixes from Owen, plus initial attempt to
6906 handle unaligned memory returned from malloc.
6908 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
6909 leave room for align_offset and nul byte
6910 (fixup_alignment): function to track an align_offset and
6911 ensure real->str is aligned
6912 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
6913 to allow a nul byte plus align offset
6914 (_dbus_string_lock): fix overflow issue
6915 (_dbus_string_init_const_len): add assertions on sanity of len,
6916 assign allocated to be ALLOCATION_PADDING larger than len
6917 (set_length): fixup the overflow handling
6918 (_dbus_string_get_data_len): fix overflow in assertion
6919 (open_gap): detect overflow in size of gap to be opened
6920 (_dbus_string_lengthen): add overflow check
6921 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
6922 (_dbus_string_append): add overflow check
6923 (_dbus_string_append_unichar): overflow
6924 (_dbus_string_delete): fix overflow in assertion
6925 (_dbus_string_copy_len): overflow in assertion
6926 (_dbus_string_replace_len): overflows in assertions
6927 (_dbus_string_find): change to implement in terms of
6928 _dbus_string_find_to
6929 (_dbus_string_find_to): assorted fixage
6930 (_dbus_string_equal_c_str): assert c_str != NULL,
6931 fix logic so the function works
6932 (_dbus_string_ends_with_c_str): fix overflow thingy
6933 (_dbus_string_base64_encode): overflow fix
6934 (_dbus_string_validate_ascii): overflow
6935 (_dbus_string_validate_nul): overflow
6937 2003-02-26 Havoc Pennington <hp@redhat.com>
6939 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
6941 2003-02-26 Alexander Larsson <alexl@redhat.com>
6944 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
6946 * dbus/dbus-connection.c:
6947 * dbus/dbus-connection.h:
6948 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
6949 Add dbus_connection_set_wakeup_main_function and use it when queueing
6950 incoming and outgoing messages.
6953 * dbus/dbus-dataslot.c:
6954 Threadsafe usage of DBusDataSlotAllocator
6956 * dbus/dbus-message.c: (dbus_message_get_args_iter):
6959 * dbus/dbus-server-unix.c:
6962 * glib/dbus-gmain.c:
6963 Implement the new wakeup functions for glib.
6966 * glib/test-thread-client.c:
6967 * glib/test-thread-server.c:
6968 * glib/test-thread.h:
6969 Initial cut at some thread test code. Not really done yet.
6971 2003-02-26 Havoc Pennington <hp@pobox.com>
6973 * dbus/dbus-connection.c
6974 (dbus_connection_send_message_with_reply_and_block): fix crash
6975 where we ref'd the outgoing message instead of the returned reply
6977 * dbus/dbus-transport-unix.c (do_authentication): check read watch
6978 at the end of this function, so if we didn't need to read for
6979 authentication, we reinstall it for receiving messages
6981 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
6982 a NULL sender for peer-to-peer case
6984 * dbus/dbus-transport-unix.c (check_read_watch): handle
6985 !authenticated case correctly
6987 * glib/dbus-gmain.c: add support for DBusServer
6989 * dbus/dbus-server.c: add data slot support
6991 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
6992 return values and handle errors
6994 * dbus/dbus-dataslot.c: factor out the data slot stuff from
6997 * Doxyfile.in (INPUT): add glib subdir
6999 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
7000 setup_with_g_main instead of hookup_with_g_main; write docs
7002 2003-02-24 Anders Carlsson <andersca@codefactory.se>
7004 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
7005 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7006 * dbus/dbus-message.c: (dbus_message_append_boolean),
7007 (dbus_message_append_boolean_array),
7008 (dbus_message_get_args_valist), (_dbus_message_test):
7009 * dbus/dbus-message.h:
7010 * doc/dbus-specification.sgml:
7011 Various fixes as pointed out by Havoc.
7013 * test/data/invalid-messages/bad-boolean-array.message:
7014 * test/data/invalid-messages/bad-boolean.message:
7015 Add invalid boolean value test cases.
7017 2003-02-24 Anders Carlsson <andersca@codefactory.se>
7019 * dbus/dbus-internals.c: (_dbus_type_to_string):
7020 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
7021 (_dbus_marshal_validate_arg):
7022 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7023 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7024 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
7025 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
7026 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
7027 (dbus_message_iter_get_double),
7028 (dbus_message_iter_get_boolean_array), (message_iter_test):
7029 * dbus/dbus-message.h:
7030 * dbus/dbus-protocol.h:
7031 * doc/dbus-specification.sgml:
7032 * test/data/valid-messages/lots-of-arguments.message:
7033 Add support for boolean and boolean array types.
7035 2003-02-23 Havoc Pennington <hp@pobox.com>
7037 * dbus/dbus-keyring.c: finish most of this implementation and
7040 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
7041 these barf if the error isn't cleared to NULL
7043 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
7044 (_dbus_create_directory): new function
7046 * dbus/dbus-errors.c (dbus_set_error): fix warning
7048 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
7049 (_dbus_string_hex_decode): new function
7050 (test_hex_roundtrip): test code
7052 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
7054 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
7056 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
7057 the save-to-temp/rename trick to atomically write the new file
7058 (_dbus_string_parse_uint): new function
7060 2003-02-22 Havoc Pennington <hp@pobox.com>
7062 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
7064 2003-02-22 Havoc Pennington <hp@pobox.com>
7066 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
7067 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
7069 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
7071 * dbus/test/data/sha-1: add US government test suite for SHA-1
7073 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7075 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
7076 Make string arrays NULL-terminated.
7078 * dbus/dbus-memory.c: (dbus_free_string_array):
7079 * dbus/dbus-memory.h:
7080 New function for freeing NULL-terminated string arrays.
7082 * dbus/dbus-message-builder.c: (append_quoted_string),
7083 (_dbus_message_data_load):
7084 Add support for array types.
7086 * dbus/dbus-message.c: (check_message_handling):
7087 Add more types as test cases.
7089 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
7090 (_dbus_string_parse_double):
7091 Add the start offset to the end offset.
7093 * test/data/valid-messages/lots-of-arguments.message:
7094 New test message with lots of arguments.
7096 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7098 * dbus/dbus-message.c: (dbus_message_append_nil),
7099 (dbus_message_append_int32), (dbus_message_append_uint32),
7100 (dbus_message_append_double), (dbus_message_append_string),
7101 (dbus_message_append_int32_array),
7102 (dbus_message_append_uint32_array),
7103 (dbus_message_append_double_array),
7104 (dbus_message_append_byte_array),
7105 (dbus_message_append_string_array):
7106 Fix all out-of-memory handling in these functions.
7108 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7110 * dbus/dbus-message.c: (dbus_message_append_nil):
7113 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7115 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7116 (dbus_message_append_nil), (dbus_message_append_int32_array),
7117 (dbus_message_append_uint32_array),
7118 (dbus_message_append_double_array),
7119 (dbus_message_append_byte_array),
7120 (dbus_message_append_string_array), (dbus_message_get_args_valist),
7121 (dbus_message_iter_get_int32_array),
7122 (dbus_message_iter_get_uint32_array),
7123 (dbus_message_iter_get_double_array),
7124 (dbus_message_iter_get_byte_array),
7125 (dbus_message_iter_get_string_array):
7127 * dbus/dbus-message.h:
7128 Add functions for appending and getting arrays.
7130 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7132 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
7133 element size at least 8 bytes, fixes mempool tests on
7136 2003-02-20 Alexander Larsson <alexl@redhat.com>
7138 * dbus/dbus-transport-unix.c (unix_do_iteration):
7139 Unlock the connection mutex during a blocking select call.
7140 Add todo about how we need a way to wake up the select.
7142 * dbus/dbus-connection-internal.h:
7143 * dbus/dbus-connection.c:
7144 Add _dbus_connection_lock and _dbus_connection_unlock.
7146 2003-02-19 Havoc Pennington <hp@pobox.com>
7148 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
7149 Doxyfile.in, not Doxyfile
7151 * dbus/dbus-keyring.c: do some hacking on this
7153 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
7155 * dbus/dbus-errors.c (dbus_set_error_const): do not call
7157 (dbus_set_error): remove dbus_error_init, check for message ==
7158 NULL *before* we sprintf into it, and add @todo about including
7159 system headers in this file
7161 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
7163 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
7165 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
7166 get various bits of user information based on either username
7168 (_dbus_homedir_from_username): new function
7170 2003-02-19 Anders Carlsson <andersca@codefactory.se>
7173 Add check for nonposix getpwnam_r
7175 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
7176 Align the pool element size to a sizeof (void *) boundary.
7178 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
7179 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
7180 General Solaris fixes.
7182 * test/data/valid-messages/simplest-manual.message:
7183 Explicitly state that we want little-endian packing.
7185 2003-02-19 Mikael Hallendal <micke@codefactory.se>
7187 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
7189 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
7190 Added to create a transport connecting using a tcp/ip socket.
7192 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
7193 to a tcp socket at given host and port.
7194 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
7197 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
7199 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
7200 Added to create a server listening on a TCP/IP socket.
7202 2003-02-19 Havoc Pennington <hp@pobox.com>
7204 Throughout: mop up all the Doxygen warnings and undocumented
7207 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
7208 to search any paths.
7210 * dbus/dbus-threads.c: move global mutex initializers to
7211 dbus-internals.h, multiple prototypes was confusing doxygen
7212 besides being kind of ugly
7214 * Doxyfile (PREDEFINED): have Doxygen define
7215 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
7216 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
7217 (do not abuse the feature! it's for stuff like the autogenerated
7218 macros in dbus-md5.c, not just for things you don't feel like
7221 2003-02-18 Havoc Pennington <hp@pobox.com>
7223 * dbus/dbus-string.c (_dbus_string_zero): new function
7225 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
7226 wrap it in some dbus-friendly API
7228 * dbus/dbus-types.h: add 16-bit types
7230 2003-02-18 Joe Shaw <joe@assbarn.com>
7232 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
7233 credentials from our currently running process.
7234 (get_word): Fix a buglet where we were copying the entire length
7235 instead of relative to our position.
7237 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
7238 keys on the stack... it's 640k of data.
7240 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
7241 read the credentials byte off the socket, even if we don't have
7243 (_dbus_poll): Implement poll() using select() for systems which
7246 * glib/test-dbus-glib.c (main): Print out an error if no
7247 parameters are given.
7249 * test/data/auth/fallback.auth-script: Added. Tests that a client
7250 can fallback to a secondary auth mechanism if the first fails.
7252 2003-02-18 Havoc Pennington <hp@pobox.com>
7256 2003-02-17 Havoc Pennington <hp@pobox.com>
7258 * doc/dbus-specification.sgml: lots of cosmetic
7259 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
7260 env variable to DBUS_BUS_ADDRESS, s/client/application/,
7261 s/server/bus/ (except in authentication section). Add a section
7262 "Message Bus Message Routing"
7264 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
7270 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7272 * doc/dbus-specification.sgml:
7273 Specification updates.
7275 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7277 * bus/activation.c: (bus_activation_init), (child_setup),
7278 (bus_activation_activate_service):
7280 * bus/main.c: (main):
7281 Set DBUS_ADDRESS environment variable.
7283 * dbus/dbus-errors.c: (dbus_set_error):
7284 Don't use va_copy since that's a C99 feature.
7286 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
7287 (_dbus_spawn_async):
7288 * dbus/dbus-sysdeps.h:
7289 Add child_setup_func to _dbus_spawn_async.
7291 * doc/dbus-specification.sgml:
7292 Update specification.
7294 * test/spawn-test.c: (setup_func), (main):
7297 2003-02-17 Alexander Larsson <alexl@redhat.com>
7299 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
7302 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7306 * doc/dbus-test-plan.sgml:
7307 Add test plan document.
7312 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7314 * dbus/dbus-message.c: (decode_header_data),
7315 (_dbus_message_loader_return_buffer):
7316 Set the header padding amount when loading a message.
7318 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7320 * bus/dispatch.c: (send_one_message):
7321 Only send broadcast messages to registered connections.
7323 * dbus/dbus-message.c: (dbus_message_name_is):
7324 * dbus/dbus-message.h:
7325 New convenience function.
7327 * dbus/dbus-transport-debug.c: (do_reading):
7328 Only dispatch one message per run.
7331 * test/bus-test.c: (new_connection_callback), (die),
7332 (test_hello_client1_handler), (test_hello_client2_handler),
7333 (test_hello_replies), (main):
7335 * test/bus-test-loop.[ch]:
7338 2003-02-16 Havoc Pennington <hp@pobox.com>
7340 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
7341 backward conditional
7343 2003-02-16 Alexander Larsson <alexl@redhat.com>
7345 * dbus/dbus-connection.c:
7346 Implement sent_message_with_reply. (with_reply_and block is still
7348 Made dispatch_message not lose message if OOM.
7350 * dbus/dbus-errors.h:
7351 Add NoReply error (for reply timeouts).
7353 2003-02-16 Alexander Larsson <alexl@redhat.com>
7355 * dbus/dbus-hash.c (_dbus_hash_table_unref):
7356 Actually free keys and values when destroying hashtable.
7358 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7360 * dbus/dbus-auth.c: (client_try_next_mechanism):
7363 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
7364 Return TRUE if there's no thread implementation around.
7366 * glib/dbus-gmain.c: (free_source),
7367 (dbus_connection_hookup_with_g_main):
7368 Make sure to remove the GSource when the connection is finalized.
7370 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7372 * bus/dispatch.c: (bus_dispatch_message_handler):
7373 * dbus/dbus-errors.h:
7374 Return an error if someone tries to send a message to a service
7377 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7379 * bus/activation.c: (load_directory), (bus_activation_init),
7380 (bus_activation_activate_service):
7383 (bus_driver_handle_activate_service), (bus_driver_handle_message):
7384 More work on the activation handling.
7386 * dbus/dbus-errors.h:
7387 Add some error messages
7389 * dbus/dbus-message.c: (dbus_message_new_error_reply):
7390 * dbus/dbus-message.h:
7391 New function that creates an error message.
7393 * dbus/dbus-protocol.h:
7394 Add ACTIVATE_SERVER message.
7396 * dbus/dbus-server-unix.c: (unix_handle_watch),
7397 (_dbus_server_new_for_domain_socket):
7398 Call _dbus_fd_set_close_on_exec.
7400 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
7401 (_dbus_spawn_async), (_dbus_disable_sigpipe),
7402 (_dbus_fd_set_close_on_exec):
7403 * dbus/dbus-sysdeps.h:
7404 Add _dbus_fd_set_close_on exec function. Also add function that checks
7405 that all open fds are set to close-on-exec and warns otherwise.
7407 * dbus/dbus-transport-unix.c:
7408 (_dbus_transport_new_for_domain_socket):
7409 Call _dbus_fd_set_close_on_exec.
7411 2003-02-16 Havoc Pennington <hp@pobox.com>
7413 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
7414 allow people to avoid setting SIGPIPE to SIG_IGN
7415 (_dbus_connection_new_for_transport): disable SIGPIPE unless
7416 we've been asked not to
7418 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7420 * dbus/dbus-list.c: (_dbus_list_append_link),
7421 (_dbus_list_prepend_link):
7422 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
7426 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7429 * bus/activation.c: (bus_activation_entry_free),
7430 (add_desktop_file_entry), (load_directory), (bus_activation_init):
7432 * bus/main.c: (main):
7433 Add simple activation support, doesn't work yet though.
7435 2003-02-15 Zack Rusin <zack@kde.org>
7437 * qt/dbus-qthread.cpp: small casting fix
7439 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7441 * dbus/dbus-errors.c: (dbus_set_error):
7442 * dbus/dbus-errors.h:
7443 Add a few errors and make dbus_set_error void.
7445 * dbus/dbus-sysdeps.c:
7446 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
7447 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
7448 * dbus/dbus-sysdeps.h:
7449 Add _dbus_spawn_async.
7451 * test/spawn-test.c: (main):
7452 Test for _dbus_spawn_async.
7454 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7456 * dbus/dbus-internals.h:
7457 Fix build without tests.
7459 * dbus/dbus-list.c: (alloc_link):
7460 Fix a segfault when a malloc fails.
7462 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
7463 (dbus_malloc0), (dbus_realloc):
7464 Add support for malloc debugging.
7466 2003-02-15 Alexander Larsson <alexl@redhat.com>
7468 * dbus/dbus-threads.c:
7469 * dbus/dbus-threads.h:
7470 Add condvars. Remove static mutext from API.
7471 Implement static mutexes by initializing them from threads_init.
7473 * glib/dbus-gthread.c:
7474 * qt/dbus-qthread.cpp:
7475 Update with the thread api changes.
7480 Turn StaticMutex into normal mutex + init function.
7481 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
7482 _dbus_list_append_link, _dbus_list_prepend_link
7485 * dbus/dbus-sysdeps.c:
7486 * dbus/dbus-sysdeps.h:
7487 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
7488 _dbus_atomic_dec. Only slow fallback implementation at the moment.
7490 * dbus/dbus-protocol.h:
7491 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
7493 * dbus/dbus-message.c:
7494 Make ref/unref atomic.
7497 * dbus/dbus-connection-internal.h:
7498 * dbus/dbus-connection.c:
7499 * dbus/dbus-connection.h:
7501 Change _peek to _borrow,_return & _steal_borrowed.
7502 Change disconnect callback to event.
7503 Make dbus_connection_dispatch_messages reentrant.
7505 * dbus/dbus-transport.c:
7506 Don't ref the connection on calls to the transport
7509 * dbus/dbus-message-handler.c:
7512 * glib/dbus-gmain.c:
7513 Don't use peek_message anymore
7516 * test/debug-thread.c:
7517 * test/debug-thread.h:
7518 Simple thread implementation that asserts() on deadlocks in
7519 single-threaded code.
7522 (main) Call debug_threads_init.
7525 Use disconnect message instead of disconnect callback.
7529 Don't call dbus_connection_set_disconnect_function. Instead export
7530 bus_connection_disconnect.
7533 Call bus_connection_disconnect when we get a disconnected message.
7535 2003-02-15 Havoc Pennington <hp@pobox.com>
7537 * dbus/dbus-message.c (dbus_message_new): fool around with the
7540 2003-02-14 Havoc Pennington <hp@pobox.com>
7542 * dbus/dbus-mempool.c: fail if the debug functions so indicate
7544 * dbus/dbus-memory.c: fail if the debug functions indicate we
7547 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
7548 (_dbus_decrement_fail_alloc_counter): debug functions to
7549 simulate memory allocation failures
7551 2003-02-14 Havoc Pennington <hp@pobox.com>
7553 * dbus/dbus-errors.h (struct DBusError): add a word of padding
7556 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7558 * bus/driver.c: (bus_driver_handle_hello):
7560 * bus/services.c: (bus_service_lookup):
7561 Reorder message sending so we get a more sane order.
7563 * test/bus-test.c: (message_handler):
7566 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7568 * bus/driver.c: (bus_driver_send_service_deleted),
7569 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7570 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
7571 (bus_driver_send_welcome_message),
7572 (bus_driver_handle_list_services),
7573 (bus_driver_handle_acquire_service),
7574 (bus_driver_handle_service_exists):
7575 * dbus/dbus-bus.c: (dbus_bus_register_client),
7576 (dbus_bus_acquire_service), (dbus_bus_service_exists):
7577 * dbus/dbus-errors.c: (dbus_result_to_string):
7578 * dbus/dbus-errors.h:
7579 * dbus/dbus-message.c: (dbus_message_append_args),
7580 (dbus_message_append_args_valist), (dbus_message_get_args),
7581 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
7582 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
7583 (dbus_message_iter_get_byte_array),
7584 (dbus_message_iter_get_string_array), (message_iter_test),
7585 (check_message_handling), (_dbus_message_test):
7586 * dbus/dbus-message.h:
7587 * test/bus-test.c: (main):
7588 Change fields to arguments in messages, so that they won't be
7589 confused with header fields.
7591 * glib/test-dbus-glib.c: (main):
7592 Remove append_fields from hello message.
7594 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7596 * dbus/dbus-errors.c:
7597 * dbus/dbus-message.c:
7598 * dbus/dbus-string.c:
7599 Documentation fixes.
7601 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7603 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
7605 Implement support for timeouts in dbus-glib.
7607 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7609 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7610 * dbus/dbus-message.c: (process_test_subdir):
7611 * test/break-loader.c: (find_breaks_based_on):
7612 Plug some memory leaks.
7614 2003-02-13 Richard Hult <rhult@codefactory.se>
7616 * bus/main.c: Fix build.
7618 * dbus/dbus-errors.h:
7619 * dbus/dbus-errors.c: Fix copyright for Anders.
7621 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7626 * bus/connection.c: (bus_connection_foreach):
7629 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
7630 (unescape_string), (new_section), (parse_section_start),
7631 (parse_key_value), (report_error), (bus_desktop_file_load),
7632 (bus_desktop_file_get_string):
7633 * bus/desktop-file.h:
7634 Use DBusError for error reporting.
7636 * bus/dispatch.c: (send_one_message),
7637 (bus_dispatch_message_handler):
7638 * bus/driver.c: (bus_driver_send_service_deleted),
7639 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7640 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
7641 (bus_driver_send_welcome_message),
7642 (bus_driver_handle_list_services),
7643 (bus_driver_handle_acquire_service),
7644 (bus_driver_handle_service_exists):
7645 * bus/loop.c: (bus_loop_run):
7647 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
7649 * bus/utils.c: (bus_wait_for_memory):
7651 New files with general utility functions.
7653 * dbus/dbus-internals.h:
7654 Remove _DBUS_HANDLE_OOM.
7656 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7658 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
7659 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
7660 * dbus/dbus-errors.h:
7661 Add DBusError structure.
7663 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7665 * test/data/valid-messages/standard-acquire-service.message:
7666 * test/data/valid-messages/standard-hello.message:
7667 * test/data/valid-messages/standard-list-services.message:
7668 * test/data/valid-messages/standard-service-exists.message:
7669 Add some standard messages.
7671 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7673 * bus/driver.c: (bus_driver_send_welcome_message),
7674 (bus_driver_handle_list_services),
7675 (bus_driver_handle_acquire_service),
7676 (bus_driver_handle_service_exists), (bus_driver_handle_message):
7677 Update for API changes in libdbus.
7679 * dbus/dbus-message.c: (dbus_message_new_reply):
7680 * dbus/dbus-message.h:
7681 Remove the name argument. The spec states that replies shouldn't
7684 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7686 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
7687 (report_error), (bus_desktop_file_load), (lookup_section),
7688 (lookup_line), (bus_desktop_file_get_raw),
7689 (bus_desktop_file_get_string):
7690 * bus/desktop-file.h:
7691 Some fixes, and new functions for getting a key value from a section.
7693 2003-02-13 Havoc Pennington <hp@pobox.com>
7695 * test/data/auth/fail-after-n-attempts.auth-script: new test
7697 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
7700 2003-02-13 Havoc Pennington <hp@pobox.com>
7702 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
7703 dbus_credentials_match were backward
7705 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
7706 NO_CREDENTIALS and ROOT_CREDENTIALS
7708 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
7709 into here. Never process more commands after we've reached an
7710 end state; store further data as unused bytes.
7712 * test/data/auth/*: add more auth tests
7714 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
7715 command to match exact string and EXPECT_UNUSED to match unused
7718 * test/Makefile.am (dist-hook): fix to dist all the test stuff
7720 2003-02-12 Havoc Pennington <hp@pobox.com>
7722 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
7723 \r off of popped lines
7725 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
7728 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
7731 2003-02-12 Havoc Pennington <hp@pobox.com>
7733 * dbus/Makefile.am: remove break-loader from the build, since it
7736 * configure.in: add --enable-gcov to turn on coverage profiling
7737 flags and disable optimization
7739 2003-02-10 Havoc Pennington <hp@pobox.com>
7741 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
7742 initial cut at test framework for DBusAuth from laptop.
7743 Doesn't quite work yet but it compiles and I need to get
7744 it off the 266mhz laptop. ;-)
7746 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
7747 fix a memleak in error case
7749 2003-02-12 Anders Carlsson <andersca@codefactory.se>
7752 * bus/desktop-file.c:
7753 * bus/desktop-file.h:
7754 Add a desktop file parser.
7756 2003-02-11 Zack Rusin <zack@kde.org>
7758 * qt/message.[h|cpp]: sample implementation
7759 of the KDE wrapper for DBusMessage
7761 2003-02-09 Zack Rusin <zack@kde.org>
7763 * test/bus-test.c: make_it_compile
7764 * doc/dbus-specification.sgml: minimal semantic fix
7766 2003-02-06 Anders Carlsson <andersca@codefactory.se>
7772 2003-02-06 Anders Carlsson <andersca@codefactory.se>
7775 * dbus/dbus-break-loader.c:
7777 * test/break-loader.c:
7778 Move dbus-break-loader to test/ and rename it to break-loader.
7780 2003-02-02 Havoc Pennington <hp@pobox.com>
7782 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
7783 for code to manage cookies in your home directory
7785 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
7787 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
7788 to authenticate, then disconnect the client.
7790 2003-02-03 Alexander Larsson <alexl@redhat.com>
7792 * dbus/dbus-message.c (dbus_message_append_fields):
7795 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7797 * doc/dbus-specification.sgml:
7798 Update address format section.
7800 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7803 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
7804 (message_handler), (new_connection_callback), (loop_quit),
7808 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7810 * bus/driver.c: (bus_driver_handle_service_exists):
7811 Simplify the code a bit.
7813 * dbus/dbus-bus.c: (dbus_bus_service_exists):
7816 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7819 Add libdbus-daemon.la and link to it.
7821 2003-02-01 James Willcox <jwillcox@gnome.org>
7823 * bus/driver.c: (bus_driver_handle_own_service):
7824 Actually include the service reply code in the message.
7826 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7828 * bus/driver.c: (bus_driver_handle_service_exists):
7829 Don't unref the incoming message.
7831 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7833 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
7835 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7837 * dbus/dbus-server.c: (dbus_server_listen):
7838 * dbus/dbus-transport.c: (_dbus_transport_open):
7839 ifdef out the calls to the debug transport and server.
7841 2003-02-02 Alexander Larsson <alexl@redhat.com>
7843 * dbus/dbus-watch.c (dbus_watch_get_flags):
7844 Add note in the docs that ERROR or HANGUP won't be returned
7845 and are assumed always on.
7847 * glib/dbus-gmain.c (add_watch):
7848 Always add IO_ERR | IO_HUP
7850 * dbus/dbus-message.h:
7851 Add semicolon after dbus_message_iter_get_string_array().
7852 Makes qt code build again
7854 2003-02-01 Anders Carlsson <andersca@codefactory.se>
7856 * bus/driver.c: (create_unique_client_name),
7857 (bus_driver_handle_hello):
7858 Don't take a name, just use a numeric id to identify
7862 * dbus/dbus-bus.c: (dbus_bus_register_client),
7863 (dbus_bus_acquire_service), (dbus_bus_service_exists):
7865 Add new convenience functions for communicating with the bus.
7867 * dbus/dbus-message.h:
7869 * dbus/dbus-protocol.h:
7872 2003-02-01 Alexander Larsson <alexl@redhat.com>
7874 * dbus/dbus-message.c (dbus_message_append_fields):
7875 Add some more doc comments.
7877 2003-02-01 Havoc Pennington <hp@pobox.com>
7879 * dbus/dbus-break-loader.c (randomly_modify_length): change
7880 a 4-byte value in the message as if it were a length
7882 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
7883 execute bit on saved files
7885 2003-02-01 Havoc Pennington <hp@pobox.com>
7887 * dbus/dbus-break-loader.c (main): new program to find messages
7888 that break the loader.
7890 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
7891 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
7893 * dbus/dbus-string.c (_dbus_string_set_byte): new
7895 2003-01-31 Havoc Pennington <hp@pobox.com>
7897 * dbus/dbus-message.c: refactor the test code to be more general,
7898 in preparation for writing a "randomly permute test cases to
7899 try to break the loader" program.
7901 2003-01-31 Havoc Pennington <hp@pobox.com>
7903 * doc/dbus-specification.sgml: work on the specification
7905 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
7906 the protocol version of the message.
7908 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
7909 no longer specifies that.
7910 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
7913 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
7914 "break" for DBUS_TYPE_NIL, remove @todo
7916 2003-01-31 Havoc Pennington <hp@pobox.com>
7918 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
7919 just set_is_error/get_is_error as this is a commonly-used
7920 function, and write docs.
7922 2003-01-31 Anders Carlsson <andersca@codefactory.se>
7924 * dbus/dbus-address.c: (dbus_address_entry_free):
7925 Free key and value lists.
7927 * dbus/dbus-internals.c: (_dbus_type_to_string):
7928 Add the types we didn't have.
7930 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
7931 (_dbus_marshal_validate_arg):
7934 * dbus/dbus-message.c: (dbus_message_set_sender):
7935 Remove todo about being able to set sender to NULL.
7937 (dbus_message_set_is_error_reply),
7938 (dbus_message_get_is_error_reply):
7939 * dbus/dbus-message.h:
7942 * dbus/dbus-protocol.h:
7943 Add error reply flag.
7945 * test/data/valid-messages/opposite-endian.message:
7946 Add NIL type to test.
7948 2003-01-31 Havoc Pennington <hp@pobox.com>
7950 * doc/dbus-specification.sgml: fully specify the header. Add
7951 flags and major protocol version, and change header/body len to
7954 * dbus/dbus-message-builder.c (append_saved_length): append length
7957 * dbus/dbus-message.c (dbus_message_create_header): change header
7958 length and body length to unsigned. Add the new fields from the
7960 (_dbus_message_loader_return_buffer): unsigned header/body len
7962 2003-01-30 Havoc Pennington <hp@pobox.com>
7964 * dbus/dbus-auth.c: rework to use only REJECTED, no
7967 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
7968 use REJECTED, suggested by Mark McLoughlin
7970 2003-01-30 Havoc Pennington <hp@pobox.com>
7972 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
7973 a better way to report errors here. e.g. "unix address lacks
7974 path" or something. also "no such file" when the path doesn't
7977 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
7979 (dbus_parse_address): add @todo about documenting address format,
7980 and allowing , and ; to be escaped
7982 2003-01-30 Anders Carlsson <andersca@codefactory.se>
7985 Add dbus-address.[ch]
7987 * dbus/dbus-address.c: (dbus_address_entry_free),
7988 (dbus_address_entries_free), (create_entry),
7989 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
7990 (dbus_parse_address), (_dbus_address_test):
7991 * dbus/dbus-address.h:
7992 New files for dealing with address parsing.
7994 * dbus/dbus-connection.c:
7995 Document timeout functions.
7997 * dbus/dbus-message.c:
7998 Document dbus_message_new_from_message.
8000 * dbus/dbus-server-debug.c:
8003 * dbus/dbus-server.c: (dbus_server_listen):
8004 Parse address and use correct server implementation.
8006 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
8007 * dbus/dbus-string.h:
8008 New function with test.
8010 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
8014 * dbus/dbus-transport-debug.c:
8017 * dbus/dbus-transport.c: (_dbus_transport_open):
8018 Parse address and use correct transport implementation.
8020 2003-01-30 Havoc Pennington <hp@pobox.com>
8022 * dbus/dbus-message.c: use message->byte_order instead of
8023 DBUS_COMPILER_BYTE_ORDER throughout.
8024 (dbus_message_create_header): pad header to align the
8025 start of the body of the message to 8-byte boundary
8027 * dbus/dbus-marshal.h: make all the demarshalers take const
8028 DBusString arguments.
8030 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
8031 validate message args here, so we don't have to do slow validation
8032 later, and so we catch bad messages as they are incoming. Also add
8033 better checks on header_len and body_len. Also fill in
8036 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
8037 implemented properly)
8038 (_dbus_string_validate_nul): new function to check all-nul
8040 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
8041 get_arg_end_pos and remove all validation
8042 (_dbus_marshal_validate_arg): actually do validation here.
8044 2003-01-29 Havoc Pennington <hp@pobox.com>
8046 * dbus/dbus-message.c (check_message_handling): fix assertion
8047 failure on set_client_serial
8049 2003-01-28 Havoc Pennington <hp@pobox.com>
8051 * dbus/dbus-server-debug.c: Add doc section comments
8053 * dbus/dbus-transport-debug.c: add doc section comments
8055 2003-01-28 Havoc Pennington <hp@redhat.com>
8057 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
8058 the reverse order from how I had it
8059 (_dbus_string_base64_encode): reverse encoding order. I was
8060 basically byteswapping everything during encoding.
8062 2003-01-28 Anders Carlsson <andersca@codefactory.se>
8064 * dbus/dbus-connection-internal.h:
8065 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
8066 (_dbus_connection_remove_timeout):
8067 Add functions for adding and removing timeouts.
8069 * dbus/dbus-message.c: (dbus_message_new_from_message):
8070 Add new function that takes a message and creates an exact
8071 copy of it, but with the refcount set to 1.
8072 (check_message_handling):
8075 * dbus/dbus-server-protected.h:
8076 * dbus/dbus-server.c: (_dbus_server_init_base),
8077 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
8078 (dbus_server_set_timeout_functions):
8079 (_dbus_server_remove_timeout):
8080 New functions so that a server can add and remove timeouts.
8082 (dbus_server_listen):
8083 Add commented out call to dbus_server_debug_new.
8085 * dbus/dbus-timeout.c: (_dbus_timeout_new):
8086 Actually set the handler, doh.
8088 * dbus/dbus-transport.c: (_dbus_transport_open):
8089 Add commented out call to dbus_transport_debug_client_new.
8092 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
8094 2003-01-28 Havoc Pennington <hp@pobox.com>
8096 * dbus/dbus-message.c (check_message_handling): function to check
8097 on the loaded message, iterates over it etc.
8099 2003-01-28 Havoc Pennington <hp@pobox.com>
8101 * test/Makefile.am (dist-hook): fix make distdir
8103 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
8105 2003-01-27 Havoc Pennington <hp@pobox.com>
8107 * dbus/dbus-mempool.c (time_for_size): replace printf with
8110 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
8111 empty lines; fix the SAVE_LENGTH stuff to be
8112 START_LENGTH/END_LENGTH so it actually works; couple other
8115 * test/Makefile.am (dist-hook): add dist-hook for .message files
8117 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
8118 can be constant or locked.
8119 (_dbus_string_free): allow freeing a const string as
8122 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
8124 * dbus/dbus-test-main.c (main): take an argument which is the
8125 directory containing test data
8127 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
8128 argument to this and load all the messages in test/data/
8129 checking that they can be loaded or not loaded as appropriate.
8131 2003-01-27 Anders Carlsson <andersca@codefactory.se>
8133 * bus/dispatch.c: (bus_dispatch_message_handler):
8134 Dispatch messages sent to services.
8136 * bus/driver.c: (bus_driver_send_service_deleted),
8137 (bus_driver_send_service_created), (bus_driver_send_service_lost),
8138 (bus_driver_send_service_acquired):
8139 Add helper functions for sending service related messages.
8141 (bus_driver_send_welcome_message):
8142 Send HELLO_REPLY instead of WELCOME.
8144 (bus_driver_handle_list_services):
8145 Send LIST_SERVICES_REPLY instead of SERVICES.
8147 (bus_driver_handle_own_service),
8148 (bus_driver_handle_service_exists):
8149 New message handlers.
8151 (bus_driver_handle_message):
8152 Invoke new message handlers.
8154 (bus_driver_remove_connection):
8155 Don't remove any services here since that's done automatically
8156 by bus_service_remove_owner now.
8159 New function signatures.
8161 * bus/services.c: (bus_service_add_owner):
8162 Send ServiceAcquired message if we're the only primary owner.
8164 (bus_service_remove_owner):
8165 Send ServiceAcquired/ServiceLost messages.
8167 (bus_service_set_prohibit_replacement),
8168 (bus_service_get_prohibit_replacement):
8169 Functions for setting prohibit replacement.
8171 (bus_service_has_owner):
8172 New function that checks if a connection is in the owner queue of
8176 Add new function signatures.
8178 * dbus/dbus-list.c: (_dbus_list_test):
8179 Add tests for _dbus_list_remove_last and traversing the list backwards.
8182 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
8183 go any further, so return NULL then.
8185 * dbus/dbus-protocol.h:
8186 Add new messages, service flags and service replies.
8188 2003-01-26 Havoc Pennington <hp@pobox.com>
8190 * dbus/dbus-message-builder.c: implement, completely untested.
8192 * test/data/*: add data to be used in testing.
8193 ".message" files are our simple loadable text format.
8194 ".message-raw" will be binary dumps of messages.
8196 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
8198 2003-01-26 Havoc Pennington <hp@pobox.com>
8200 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
8202 * dbus/dbus-errors.c (dbus_result_to_string): add
8205 * dbus/dbus-message-builder.c: new file, will contain code to load
8206 up messages from files. Not implemented yet.
8208 2003-01-26 Havoc Pennington <hp@pobox.com>
8210 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
8211 the sender by setting to NULL
8213 2003-01-26 Havoc Pennington <hp@pobox.com>
8215 The unit tests pass, but otherwise untested. If it breaks, the
8216 tests should have been better. ;-)
8218 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
8221 * dbus/dbus-message.c: redo everything so we maintain
8222 message->header as the only copy of the various fields.
8223 This avoids the possibility of out-of-memory in some cases,
8224 for example dbus_message_lock() can't run out of memory anymore,
8225 and avoids extra copying. Figured I may as well go ahead and do
8226 this since it was busted for dbus_message_lock to not return
8227 failure on OOM, and dbus_message_write_header was totally
8228 unchecked for OOM. Also fixed some random other bugs.
8230 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
8231 that strings are nul-terminated. Also, end_pos can be equal
8232 to string length just not greater than, I think.
8233 (_dbus_marshal_set_int32): new function
8234 (_dbus_marshal_set_uint32): new function
8235 (_dbus_marshal_set_string): new function
8237 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
8238 a warning, init timeout_list to NULL
8239 (dbus_connection_send_message): don't use uninitialized variable
8242 * dbus/dbus-string.c (_dbus_string_replace_len): new function
8244 2003-01-26 Anders Carlsson <andersca@codefactory.se>
8246 * bus/driver.c: (bus_driver_handle_hello),
8247 (bus_driver_send_welcome_message):
8250 2003-01-26 Anders Carlsson <andersca@codefactory.se>
8252 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
8253 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
8254 (dbus_connection_unref):
8255 * dbus/dbus-marshal.c: (_dbus_marshal_test):
8256 * dbus/dbus-message.c: (dbus_message_unref),
8259 (dbus_message_get_fields):
8260 Remove debugging printout.
8262 (_dbus_message_loader_return_buffer):
8263 Don't store the header string.
8265 (_dbus_message_test):
8268 2003-01-26 Richard Hult <rhult@codefactory.se>
8270 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
8271 the file descriptor list, since it can change under us.
8273 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8275 * glib/dbus-gmain.c: (dbus_connection_prepare),
8276 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
8277 (remove_watch), (dbus_connection_hookup_with_g_main):
8278 Rewrite the glib handling to use its own GSource instead of a
8279 GIOChannel so we can catch messages put in the queue while waiting
8282 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8285 * bus/connection.c: (connection_disconnect_handler),
8286 (connection_watch_callback), (bus_connection_setup):
8287 * bus/dispatch.c: (send_one_message),
8288 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
8289 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
8291 * bus/driver.c: (bus_driver_send_service_deleted),
8292 (bus_driver_send_service_created), (bus_driver_handle_hello),
8293 (bus_driver_send_welcome_message),
8294 (bus_driver_handle_list_services), (bus_driver_remove_connection),
8295 (bus_driver_handle_message):
8297 Refactor code, put the message dispatching in its own file. Use
8298 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
8301 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8303 * dbus/dbus-internals.h:
8304 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
8306 * dbus/dbus-message.c: (dbus_message_get_sender):
8307 * dbus/dbus-message.h:
8308 Implement dbus_message_get_sender.
8310 * dbus/dbus-protocol.h:
8311 Add message and service defines.
8313 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8315 * dbus/dbus-connection.c: (dbus_connection_send_message):
8316 * dbus/dbus-message-internal.h:
8317 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
8318 (dbus_message_write_header):
8319 Remove _dbus_messag_unlock and don't set the client serial on a
8320 message if one already exists.
8322 2003-01-24 Havoc Pennington <hp@pobox.com>
8324 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
8327 * bus/driver.c (bus_driver_handle_list_services): fix a leak
8330 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8332 * dbus/dbus-list.c: (alloc_link), (free_link):
8333 Use a memory pool for the links.
8335 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8337 * bus/connection.c: (bus_connection_foreach):
8339 Add new bus_connection_foreach function.
8341 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
8342 Add function that broadcasts a message to all clients.
8344 (bus_driver_send_service_created), (bus_driver_handle_hello),
8345 (bus_driver_send_welcome_message),
8346 (bus_driver_handle_list_services), (bus_driver_message_handler):
8347 Implement functions that take care of listing services, and notifying
8348 clients when new services are created.
8350 * bus/services.c: (bus_services_list):
8352 Add new function that returns an array of strings with the currently
8353 registered services.
8356 * glib/dbus-gmain.c:
8357 Update copyright year.
8359 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8361 * dbus/dbus-connection.c: (dbus_connection_send_message):
8362 Unlock the message in case it was sent earlier.
8364 (dbus_connection_send_message_with_reply_and_block):
8365 Remove the reply message from the list.
8367 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
8368 Set array_len and new_pos correctly.
8370 (_dbus_marshal_test):
8371 Remove debug output.
8373 * dbus/dbus-message-internal.h:
8374 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
8375 New function that returns the reply serial.
8377 (_dbus_message_unlock):
8378 New function that unlocks a message and resets its header.
8380 (dbus_message_append_string_array),
8381 (dbus_message_get_fields_valist),
8382 (dbus_message_iter_get_field_type),
8383 (dbus_message_iter_get_string_array),
8384 (dbus_message_get_fields),
8385 (dbus_message_append_fields_valist):
8386 Handle string arrays.
8388 (dbus_message_set_sender):
8389 Make this function public since the bus daemon needs it.
8391 (decode_header_data):
8392 Set the reply serial to -1 initially.
8394 * dbus/dbus-message.h:
8395 Add dbus_message_set_sender.
8397 2003-01-24 Havoc Pennington <hp@pobox.com>
8399 * doc/dbus-specification.sgml: add some stuff
8401 2003-01-22 Havoc Pennington <hp@pobox.com>
8403 * doc/dbus-specification.sgml: Start to document the protocol.
8405 2003-01-22 Havoc Pennington <hp@pobox.com>
8407 * dbus/dbus-connection.c
8408 (dbus_connection_send_message_with_reply_and_block): add some @todo
8410 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
8412 2003-01-21 Havoc Pennington <hp@pobox.com>
8414 (patch untested because can't compile)
8416 * bus/driver.c (create_unique_client_name): make this function
8417 never recycle client names. Also, caller should initialize
8420 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
8422 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8424 * dbus/dbus-marshal.c: (_dbus_marshal_double),
8425 (_dbus_marshal_int32), (_dbus_marshal_uint32),
8426 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
8427 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
8428 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
8429 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
8430 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
8431 * dbus/dbus-marshal.h:
8432 * dbus/dbus-protocol.h:
8433 Add support for marshalling and demarshalling integer, double
8436 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8441 * bus/connection.c: (connection_disconnect_handler):
8442 Remove the connection from the bus driver's list.
8444 (connection_watch_callback): Dispatch messages.
8446 (free_connection_data): Free connection name.
8448 (bus_connection_setup): Add connection to the bus driver's list.
8449 (bus_connection_remove_owned_service):
8450 (bus_connection_set_name), (bus_connection_get_name):
8451 Add functions for setting and getting the connection's name.
8454 Add function headers.
8456 * bus/driver.c: (create_unique_client_name),
8457 (bus_driver_handle_hello_message),
8458 (bus_driver_send_welcome_message), (bus_driver_message_handler),
8459 (bus_driver_add_connection), (bus_driver_remove_connection):
8462 * bus/services.c: (bus_service_free):
8464 New file that handles communication and registreation with the bus
8467 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8469 * dbus/dbus-connection.c: (dbus_connection_send_message):
8470 Add a new client_serial parameter.
8472 (dbus_connection_send_message_with_reply):
8473 Remove a @todo since we've implemented the blocking function.
8475 (dbus_connection_send_message_with_reply_and_block):
8476 New function that sends a message and waits for a reply and
8477 then returns the reply.
8479 * dbus/dbus-connection.h:
8482 * dbus/dbus-errors.c: (dbus_result_to_string):
8483 * dbus/dbus-errors.h:
8484 Add new DBUS_RESULT.
8486 * dbus/dbus-message-internal.h:
8487 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
8488 (_dbus_message_set_sender), (dbus_message_write_header),
8489 (dbus_message_new_reply), (decode_header_data),
8490 (_dbus_message_loader_return_buffer), (_dbus_message_test):
8491 * dbus/dbus-message.h:
8492 Add new functions that set the reply serial and sender.
8493 Also marshal and demarshal them correctly and add test.
8495 * dbus/dbus-protocol.h:
8496 Add new DBUS_MESSAGE_TYPE_SENDER.
8499 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
8500 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
8501 (dbus_connection_hookup_with_g_main):
8502 * glib/test-dbus-glib.c: (main):
8503 Rewrite to use GIOChannel and remove the GSource crack.
8505 * test/echo-client.c: (main):
8506 * test/watch.c: (check_messages):
8507 Update for changed APIs
8509 2003-01-19 Anders Carlsson <andersca@codefactory.se>
8511 * dbus/Makefile.am: Add dbus-timeout.[cħ]
8513 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
8514 Create a DBusTimeoutList.
8515 (dbus_connection_set_timeout_functions): Add new function to
8516 set timeout callbacks
8518 * dbus/dbus-connection.h: Add public DBusTimeout API.
8520 * dbus/dbus-message.c: (dbus_message_get_service):
8521 * dbus/dbus-message.h: New function.
8523 * dbus/dbus-server.c: Fix small doc typo.
8525 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
8527 2003-01-19 Anders Carlsson <andersca@codefactory.se>
8529 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
8530 of the string, just as long as specified.
8532 2003-01-19 Havoc Pennington <hp@pobox.com>
8534 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
8537 * dbus/dbus-server.c (dbus_server_set_max_connections)
8538 (dbus_server_get_max_connections, dbus_server_get_n_connections):
8539 keep track of current number of connections, and add API for
8540 setting a max (but haven't implemented enforcing the max yet)
8542 2003-01-18 Havoc Pennington <hp@pobox.com>
8544 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
8545 reading/writing if read_watch != NULL or write_watch != NULL.
8547 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
8548 the message loader code to actually load message->header and
8549 message->body into the newly-created message.
8551 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
8554 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
8555 (dbus_connection_get_max_message_size)
8556 (dbus_connection_set_max_live_messages_size)
8557 (dbus_connection_get_max_live_messages_size): implement some
8558 resource limitation functions
8560 * dbus/dbus-resources.c: new file implementing some of the
8561 resource limits stuff
8563 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
8564 missing docs, add @todo to handle OOM etc.
8566 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
8569 2003-01-18 Havoc Pennington <hp@pobox.com>
8571 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
8572 connection if it hasn't been already.
8574 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
8575 replace with DisconnectFunction.
8577 2003-01-18 Havoc Pennington <hp@pobox.com>
8579 Building --disable-verbose-mode --disable-asserts --disable-tests
8580 cuts the library from 112K to 45K or so
8582 * configure.in: check for varargs macro support,
8583 add --enable-verbose-mode, --enable-asserts.
8585 * dbus/dbus-internals.h (_dbus_assert): support
8587 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
8589 2003-01-18 Havoc Pennington <hp@pobox.com>
8591 * dbus/dbus-test.c: include config.h so that tests actually run
8593 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
8594 so the failure mode when that assumption fails will be plenty
8597 2003-01-18 Havoc Pennington <hp@pobox.com>
8599 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
8601 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
8604 * test/Makefile.am: don't use special variable "TESTS" for echo-*
8605 since we don't want to use those in make check
8607 2003-01-15 Havoc Pennington <hp@redhat.com>
8613 2003-01-15 Havoc Pennington <hp@redhat.com>
8615 * test/Makefile.am: fix so that test source code ends up in the
8616 distribution on make distcheck
8618 2003-01-15 Havoc Pennington <hp@redhat.com>
8624 2003-01-15 Havoc Pennington <hp@redhat.com>
8626 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
8627 fix build when --disable-tests
8629 * Makefile.am (EXTRA_DIST): put HACKING in here
8631 * HACKING: document procedure for making a tarball release.
8633 2003-01-14 Anders Carlsson <andersca@codefactory.se>
8635 * bus/connection.c: (connection_error_handler),
8636 (bus_connection_setup):
8637 * bus/main.c: (main):
8638 Make sure that the DBusConnectionData struct is NULLed
8639 out to prevent a segfault.
8641 * dbus/dbus-errors.c: (dbus_result_to_string):
8642 * dbus/dbus-errors.h:
8643 * dbus/dbus-message.c: (dbus_message_get_fields),
8644 (dbus_message_get_fields_valist), (_dbus_message_test):
8645 * dbus/dbus-message.h:
8646 Make dbus_message_get_fields return a result code so we can
8647 track invalid fields as well as oom.
8649 2003-01-11 Havoc Pennington <hp@pobox.com>
8651 * configure.in: change --enable-test/--enable-ansi action-if-given
8652 to enable_foo=$enableval instead of enable_foo=yes
8654 2003-01-08 Havoc Pennington <hp@pobox.com>
8656 * dbus/dbus-string.c (_dbus_string_align_length): new function
8658 * dbus/dbus-test-main.c: move main() for test app here
8660 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
8661 symbol to run tests, because dbus-test isn't in the main
8664 Code review nitpicks.
8666 * dbus/dbus-message.c (dbus_message_write_header): add newlines
8667 for people with narrow emacs ;-). Assert client_serial was filled
8668 in. Assert message->name != NULL.
8669 (dbus_message_append_fields): have "first_field_type" arg separate
8670 from va list, needed for C++ binding that also uses varargs IIRC
8671 and helps with type safety
8672 (dbus_message_new): add @todo about using DBusString to store
8673 service/name internally
8674 (dbus_message_new): don't leak ->service and ->name on OOM later
8676 (dbus_message_unref): free the service name
8677 (dbus_message_get_fields): same change to varargs
8678 i.e. first_field_type
8679 (_dbus_message_loader_return_buffer): assert that the message data
8680 is aligned (if not it's a bug in our code). Put in verbose griping
8681 about why we set corrupted = TRUE.
8682 (decode_header_data): add FIXME that char* is evil. Was going to
8683 add FIXME about evil locale-specific string.h strncmp, but just
8684 switched to wacky string-as-uint32 optimization. Move check for
8685 "no room for field name" above get_const_data_len() to avoid
8686 assertion failure in get_const_data_len if we have trailing 2
8687 bytes or the like. Check for service and name fields being
8688 provided twice. Don't leak service/name on error. Require field
8689 names to be aligned to 4 bytes.
8691 * dbus/dbus-marshal.c: move byte swap stuff to header
8692 (_dbus_pack_int32): uscore-prefix
8693 (_dbus_unpack_int32): uscore-prefix
8694 (_dbus_unpack_uint32): export
8695 (_dbus_demarshal_string): add @todo complaining about use of
8697 (_dbus_marshal_get_field_end_pos): add @todo about bad error
8698 handling allowing corrupt data to go unchecked
8700 2003-01-08 Havoc Pennington <hp@redhat.com>
8702 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
8703 to the select() as needed for authentication. (should be using
8704 _dbus_poll() not select, but for another day)
8706 * dbus/dbus.h: include dbus/dbus-protocol.h
8708 2003-01-08 Anders Carlsson <andersca@codefactory.se>
8710 * dbus/Makefile.am (dbusinclude_HEADERS): Install
8713 2003-01-08 Anders Carlsson <andersca@codefactory.se>
8715 * dbus/dbus-internals.c: (_dbus_type_to_string):
8716 New function that returns a string describing a type.
8718 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
8719 * dbus/dbus-marshal.h:
8720 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
8721 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
8722 (dbus_message_iter_get_byte_array):
8723 * dbus/dbus-message.h:
8724 Add new convenience functions for appending and getting message fields.
8725 Also add demarshalling routines for byte arrays.
8727 2003-01-07 Anders Carlsson <andersca@codefactory.se>
8729 * dbus/dbus-connection-internal.h:
8730 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
8731 (_dbus_connection_get_next_client_serial),
8732 (dbus_connection_send_message):
8733 * dbus/dbus-internals.h:
8734 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
8735 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
8736 (_dbus_marshal_uint32), (_dbus_demarshal_double),
8737 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
8738 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
8739 (_dbus_verbose_bytes), (_dbus_marshal_test):
8740 * dbus/dbus-marshal.h:
8741 * dbus/dbus-message-internal.h:
8742 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
8743 (dbus_message_write_header), (_dbus_message_lock),
8744 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
8745 (dbus_message_get_name), (dbus_message_append_int32),
8746 (dbus_message_append_uint32), (dbus_message_append_double),
8747 (dbus_message_append_string), (dbus_message_append_byte_array),
8748 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
8749 (dbus_message_iter_unref), (dbus_message_iter_has_next),
8750 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
8751 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
8752 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
8753 (decode_header_data), (_dbus_message_loader_return_buffer),
8754 (message_iter_test), (_dbus_message_test):
8755 * dbus/dbus-message.h:
8756 * dbus/dbus-protocol.h:
8757 * dbus/dbus-test.c: (main):
8759 * glib/test-dbus-glib.c: (message_handler), (main):
8760 * test/echo-client.c: (main):
8761 * test/watch.c: (check_messages):
8762 Make messages sendable and receivable for real.
8764 2003-01-07 Anders Carlsson <andersca@codefactory.se>
8766 * dbus/dbus-marshal.c: (_dbus_marshal_double),
8767 (_dbus_marshal_string), (_dbus_marshal_byte_array):
8768 * dbus/dbus-message.c: (dbus_message_append_int32),
8769 (dbus_message_append_uint32), (dbus_message_append_double),
8770 (dbus_message_append_string), (dbus_message_append_byte_array):
8771 Handle OOM restoration.
8773 2003-01-07 Anders Carlsson <andersca@codefactory.se>
8775 * dbus/dbus-marshal.c: (_dbus_marshal_string),
8776 (_dbus_demarshal_string), (_dbus_marshal_test):
8777 * dbus/dbus-marshal.h:
8778 * dbus/dbus-message.c: (dbus_message_get_name),
8779 Document these functions.
8781 (dbus_message_append_int32), (dbus_message_append_uint32),
8782 (dbus_message_append_double), (dbus_message_append_string),
8783 (dbus_message_append_byte_array):
8784 * dbus/dbus-message.h:
8785 Add functions for adding message fields of different types.
8787 * dbus/dbus-protocol.h:
8788 Add the different types.
8790 2003-01-05 Havoc Pennington <hp@pobox.com>
8792 * bus/connection.c: implement routines for handling connections,
8793 first thing is keeping a list of owned services on each connection
8794 and setting up watches etc.
8796 * bus/services.c: implement a mapping from service names to lists
8799 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
8801 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
8802 to use static mutexes for global data
8804 * dbus/dbus-connection.c (dbus_connection_set_data): add new
8805 collection of functions to set/get application-specific data
8806 on the DBusConnection.
8808 2003-01-04 Havoc Pennington <hp@pobox.com>
8810 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
8811 (_dbus_poll): new function
8813 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
8816 * bus/loop.c: initial code for the daemon main loop
8818 2003-01-04 Havoc Pennington <hp@pobox.com>
8820 * test/watch.c (error_handler): make it safe if the error handler
8821 is called multiple times (if we s/error handler/disconnect
8822 handler/ we should just guarantee it's called only once)
8824 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
8825 error handler on disconnect (it's quite possible we should
8826 just change the error handler to a "disconnect handler," I'm
8827 not sure we have any other meaningful errors)
8829 * configure.in: check for getpwnam_r
8831 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
8832 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
8833 mechanism as in SASL spec, using socket credentials
8835 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
8836 (_dbus_send_credentials_unix_socket): new function
8838 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
8840 (_dbus_write): only check errno if <0 returned
8841 (_dbus_write_two): ditto
8843 2003-01-02 Anders Carlsson <andersca@codefactory.se>
8845 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
8846 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
8847 (_dbus_marshal_test):
8848 * dbus/dbus-marshal.h:
8849 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
8850 to _dbus_marshal_utf8_string. Also fix some tests.
8852 2002-12-28 Harri Porten <porten@kde.org>
8854 * configure.in: added check for C++ compiler and a very cheesy
8855 check for the Qt integration
8857 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
8859 * qt/Makefile.am: added
8861 * qt/.cvsignore: added
8863 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
8864 latter, added #ifdef QT_THREAD_SUPPORT guard.
8866 * dbus/Makefile.am: added missing headers for make dist
8868 2002-12-28 Kristian Rietveld <kris@gtk.org>
8870 * dbus/Makefile.am: fixup export-symbols-regex.
8872 2002-12-27 Anders Carlsson <andersca@codefactory.se>
8874 * acinclude.m4: Add this file and put the
8875 PKG_CHECK_MODULE macro in it.
8877 2002-12-27 Anders Carlsson <andersca@codefactory.se>
8879 * dbus/dbus-marshal.c: (_dbus_marshal_string),
8880 (_dbus_demarshal_double), (_dbus_demarshal_int32),
8881 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
8882 (_dbus_marshal_test):
8883 Make the demarshalling routines align the pos argument.
8884 Add string marshalling tests and fix the obvious bugs
8887 2002-12-26 Havoc Pennington <hp@pobox.com>
8889 * dbus/dbus-auth.c: fixes fixes fixes
8891 * dbus/dbus-transport-unix.c: wire up support for
8892 encoding/decoding data on the wire
8894 * dbus/dbus-auth.c (_dbus_auth_encode_data)
8895 (_dbus_auth_decode_data): append to target string
8896 instead of nuking it.
8898 2002-12-26 Havoc Pennington <hp@pobox.com>
8900 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
8901 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
8904 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
8905 avoid swap_bytes() overhead (ignoring possible assembly stuff for
8906 now). Main point is because I wanted unpack_uint32 to implement
8908 (_dbus_verbose_bytes): new function
8910 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
8912 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
8913 mechanism to handle a corrupt message stream
8914 (_dbus_message_loader_new): fix preallocation to only prealloc,
8917 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
8918 (_dbus_string_test): enhance tests for copy/move and fix the
8921 * dbus/dbus-transport-unix.c: Hold references in more places to
8922 avoid reentrancy problems
8924 * dbus/dbus-transport.c: ditto
8926 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
8927 leak reference count in no-message case
8929 * test/watch.c (do_mainloop): handle adding/removing watches
8930 during iteration over the watches. Also, ref the connection/server
8931 stored on a watch, so we don't try to mangle a destroyed one.
8933 * dbus/dbus-transport-unix.c (do_authentication): perform
8936 * dbus/dbus-auth.c (get_state): add a state
8937 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
8938 (_dbus_auth_get_unused_bytes): append the unused bytes
8939 to the passed in string, rather than prepend
8941 * dbus/dbus-transport.c (_dbus_transport_init_base): create
8942 the auth conversation DBusAuth
8944 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
8945 (_dbus_transport_new_for_domain_socket): when creating a
8946 transport, pass in whether it's a client-side or server-side
8947 transport so we know which DBusAuth to create
8949 2002-12-03 Havoc Pennington <hp@pobox.com>
8951 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
8952 _after_ finalizing the derived members
8953 (unix_connection_set): unref watch if we fail to add it
8955 * dbus/dbus-connection.c (dbus_connection_unref): delete the
8956 transport first, so that the connection owned by the
8957 transport will be valid as the transport finalizes.
8959 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
8960 if necessary, and remove watches from the connection.
8962 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
8964 2002-12-26 Anders Carlsson <andersca@codefactory.se>
8966 * dbus/dbus-marshal.c: (_dbus_marshal_string),
8967 (_dbus_demarshal_double), (_dbus_demarshal_int32),
8968 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
8969 (_dbus_marshal_test):
8970 * dbus/dbus-marshal.h:
8971 Add string marshal functions and have the demarshal functions
8972 return the new position.
8974 2002-12-25 Havoc Pennington <hp@pobox.com>
8976 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
8977 it is a simple protocol that just maps directly to SASL.
8979 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
8980 initial implementation, not actually used yet.
8982 * dbus/dbus-string.c (_dbus_string_find): new function
8983 (_dbus_string_equal): new function
8984 (_dbus_string_base64_encode): new function
8985 (_dbus_string_base64_decode): new function
8987 2002-12-25 Anders Carlsson <andersca@codefactory.se>
8990 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
8991 (_dbus_marshal_int32), (_dbus_marshal_uint32),
8992 (_dbus_demarshal_double), (_dbus_demarshal_int32),
8993 (_dbus_demarshal_uint32), (_dbus_marshal_test):
8994 * dbus/dbus-marshal.h:
8995 * dbus/dbus-protocol.h:
8996 * dbus/dbus-test.c: (main):
8998 Add un-optimized marshalling/demarshalling routines.
9000 2002-12-25 Harri Porten <porten@kde.org>
9002 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
9004 2002-12-24 Zack Rusin <zack@kde.org>
9006 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
9007 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
9010 2002-12-24 Havoc Pennington <hp@pobox.com>
9012 * glib/dbus-gthread.c: fix include
9014 * glib/dbus-glib.h: rename DBusMessageHandler for now.
9015 I think glib API needs to change, though, as you don't
9016 want to use DBusMessageFunction, you want to use the
9017 DBusMessageHandler object. Probably
9018 dbus_connection_open_with_g_main_loop()
9019 and dbus_connection_setup_g_main_loop() or something like that
9020 (but think of better names...) that just create a connection
9021 that has watch/timeout functions etc. already set up.
9023 * dbus/dbus-connection.c
9024 (dbus_connection_send_message_with_reply): new function just to
9025 show how the message handler helps us deal with replies.
9027 * dbus/dbus-list.c (_dbus_list_remove_last): new function
9029 * dbus/dbus-string.c (_dbus_string_test): free a string that
9032 * dbus/dbus-hash.c: use memory pools for the hash entries
9033 (rebuild_table): be more paranoid about overflow, and
9034 shrink table when we can
9035 (_dbus_hash_test): reduce number of sprintfs and write
9036 valid C89. Add tests for case where we grow and then
9037 shrink the hash table.
9039 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
9041 * dbus/dbus-connection.c (dbus_connection_register_handler)
9042 (dbus_connection_unregister_handler): new functions
9044 * dbus/dbus-message.c (dbus_message_get_name): new
9046 * dbus/dbus-list.c: fix docs typo
9048 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
9049 an object representing a handler for messages.
9051 2002-12-16 Anders Carlsson <andersca@codefactory.se>
9054 * glib/dbus-gthread.c: (dbus_gthread_init):
9055 Don't use the gdbus prefix for public functions.
9057 2002-12-16 Anders Carlsson <andersca@codefactory.se>
9061 Add GLib checks and fixup .pc files
9065 * glib/dbus-gmain.c: (gdbus_connection_prepare),
9066 (gdbus_connection_check), (gdbus_connection_dispatch),
9067 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
9068 (dbus_connection_gsource_new):
9069 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
9070 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
9071 * glib/test-dbus-glib.c: (message_handler), (main):
9074 2002-12-15 Harri Porten <porten@kde.org>
9076 * autogen.sh: check for libtoolize before attempting to use it
9078 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
9081 * .cvsignore: ignore more stamp files
9083 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
9085 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
9086 without make install.
9088 2002-12-15 Havoc Pennington <hp@pobox.com>
9090 * dbus/dbus-threads.c: add thread stubs that a higher library
9091 layer can fill in. e.g. the GLib wrapper might fill them in with
9092 GThread stuff. We still need to use this thread API to
9093 thread-safe-ize the library.
9095 2002-12-12 Havoc Pennington <hp@pobox.com>
9097 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
9098 below new interfaces and include fewer system headers.
9100 * dbus/dbus-sysdeps.c (_dbus_read): new function
9101 (_dbus_write): new function
9102 (_dbus_write_two): new function
9103 (_dbus_connect_unix_socket): new function
9104 (_dbus_listen_unix_socket): new function
9106 * dbus/dbus-message-internal.h: change interfaces to use
9109 2002-12-11 Havoc Pennington <hp@pobox.com>
9111 * dbus/dbus-types.h: add dbus_unichar
9113 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
9115 * dbus/dbus-connection.c (dbus_connection_send_message): return
9118 * dbus/dbus-transport.c: include dbus-watch.h
9120 * dbus/dbus-connection.c: include dbus-message-internal.h
9122 * HACKING: add file with coding guidelines stuff.
9124 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
9125 handling here, for security purposes (as in vsftpd). Not actually
9126 using this class yet.
9128 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
9129 system/libc usage here, as in vsftpd, for ease of auditing (and
9130 should also simplify portability). Haven't actually moved all the
9131 system/libc usage into here yet.
9133 2002-11-25 Havoc Pennington <hp@pobox.com>
9135 * dbus/dbus-internals.c (_dbus_verbose): fix to not
9136 always print the first verbose message.
9138 2002-11-24 Havoc Pennington <hp@pobox.com>
9140 * test/echo-client.c, test/echo-server.c: cheesy test
9143 * configure.in (AC_CHECK_FUNCS): check for writev
9145 * dbus/dbus-message.c (_dbus_message_get_network_data): new
9148 * dbus/dbus-list.c (_dbus_list_foreach): new function
9150 * dbus/dbus-internals.c (_dbus_verbose): new function
9152 * dbus/dbus-server.c, dbus/dbus-server.h: public object
9153 representing a server that listens for connections.
9155 * dbus/.cvsignore: create
9157 * dbus/dbus-errors.h, dbus/dbus-errors.c:
9158 public API for reporting errors
9160 * dbus/dbus-connection.h, dbus/dbus-connection.c:
9161 public object representing a connection that
9162 sends/receives messages. (Same object used for
9163 both client and server.)
9165 * dbus/dbus-transport.h, dbus/dbus-transport.c:
9166 Basic abstraction for different kinds of stream
9167 that we might read/write messages from.
9169 2002-11-23 Havoc Pennington <hp@pobox.com>
9171 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
9174 * dbus/dbus-test.c (main): add list test, and include
9175 dbus-test.h as intended
9177 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
9178 (_dbus_hash_table_remove_int): return value indicates
9179 whether the entry existed to remove
9181 * dbus/dbus-list.c: add linked list utility class,
9184 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
9187 2002-11-23 Havoc Pennington <hp@pobox.com>
9189 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
9190 DBUS_END_DECLS to nothing, that should fix this once and for all
9192 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
9194 * dbus/dbus-message.c, dbus/dbus-hash.c:
9195 add some missing @brief
9197 2002-11-23 Havoc Pennington <hp@pobox.com>
9199 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
9200 to avoid confusing Doxygen
9202 * dbus/dbus-hash.c: @} not }@
9204 * dbus/dbus-message.c (struct DBusMessage): split out
9207 2002-11-23 Havoc Pennington <hp@pobox.com>
9209 * configure.in: pile on more warning flags if using gcc
9211 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
9212 to document static functions
9214 * configure.in: add summary to end of configure so it
9215 looks nice and attractive
9217 * dbus/dbus-hash.c: finish implementation and write unit
9220 * configure.in: add --enable-tests to enable unit tests
9222 * dbus/dbus-test.c: test program to run unit tests
9223 for all files in dbus/*, initially runs a test for
9226 * dbus/dbus-internals.h: file to hold some internal utility stuff
9228 2002-11-22 Havoc Pennington <hp@redhat.com>
9230 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
9231 "ported" away from Tcl
9233 * dbus/dbus-types.h: header for types such as dbus_bool_t
9235 2002-11-22 Havoc Pennington <hp@redhat.com>
9237 * dbus/dbus.h: fixups for doc warnings
9239 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
9241 (QUIET): make it quiet so we can see warnings
9243 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
9245 2002-11-22 Havoc Pennington <hp@redhat.com>
9247 * Makefile.am: include "Doxyfile" target in all-local
9249 * configure.in: generate the Doxyfile
9251 * Doxyfile.in: move Doxyfile here, so we can use
9252 configure to generate a Doxyfile with the right
9255 2002-11-22 Havoc Pennington <hp@redhat.com>
9257 * dbus/dbus-message.c: move inline docs into .c file
9259 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
9260 so all docs are under doc/
9261 (MAN_EXTENSION): generate man pages. Use extension
9262 ".3dbus" which matches ".3qt" on my system,
9263 I guess this is OK, I don't know really.
9264 (FILE_PATTERNS): look for .c files not .h, makes sense
9267 2002-11-22 Havoc Pennington <hp@pobox.com>
9269 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
9270 because any app can be a server, and any app can be a client,
9271 the bus is a special kind of server.
9273 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
9275 * Doxyfile : adding. Still needs Makefile rules to be generated
9276 automatically (just run "doxygen" in the toplevel dir for now to
9279 * dbus/dbus-message.h : Adding sample docs (javadoc since
9280 resembles gtk-doc a little more)
9282 * dbus/dbus.h : Adding sample docs
9284 2002-11-21 Havoc Pennington <hp@redhat.com>
9286 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
9287 so we can allow ourselves to include files directly,
9288 instead of having to use dbus.h
9290 * dbus/dbus.h: fill in
9292 * dbus/dbus-message.h: sketch out a sample header file.
9293 Include griping if you include it directly instead of
9296 * dbus/dbus-macros.h: new file with macros for extern "C",
9297 TRUE/FALSE, NULL, etc.
9299 * doc/file-boilerplate.c: put include guards in here
9301 2002-11-21 Havoc Pennington <hp@redhat.com>
9303 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
9305 * COPYING: include the GPL as well, and license code
9306 under both AFL and GPL.
9308 2002-11-21 Havoc Pennington <hp@redhat.com>
9310 * acconfig.h: get rid of this
9312 * autogen.sh (run_configure): add --no-configure option
9314 * configure.in: remove AC_ARG_PROGRAM to make
9315 autoconf complain less. add AC_PREREQ.
9316 add AC_DEFINE third arg.
9318 2002-11-21 Anders Carlsson <andersca@codefactory.se>
9321 Fix references so we can distcheck.
9323 2002-11-21 Havoc Pennington <hp@redhat.com>
9325 * Initial module creation